SAN FRANCISCO -- Mauricio Dubon hit a three-run homer off reliever Yency Almonte in the fifth inning and the San Francisco Giants beat the Colorado Rockies 7-2 on Wednesday night to move barely in front in a crowded NL wild-card race.
Logan Webb (3-4) allowed two runs and seven hits in 5 1/3 innings to win in his first career appearance as a reliever.
The Giants (28-27) have won three of four and are percentage points ahead of Cincinnati for the first of two NL wild cards. The Reds (29-28) won earlier against Milwaukee (27-28), another close contender.
"Being in this clubhouse is really fun," Dubon said. "You're playing meaningful baseball and every hit, every run, every home run, every catch you make counts. That's the fun part of it."
Raimel Tapia had two hits and an RBI for Colorado.
Dubon's homer on Almonte's second pitch came just after Rockies manager Bud Black pulled starter Ryan Castellani following walks to Belt and Longoria. It was Dubon's third home run this season and the seventh of his career.
"It was a huge confidence boost for him because he has been hitting some balls on the button that haven't left the ballpark," Giants manager Gabe Kapler said. "That confidence spilled over into the dugout. It was one of the more exciting moments of the last couple weeks."
Longoria homered off Castellani leading off the fourth to snap an 0-for-16 slide.
Webb pitched in relief after the Giants used an opener for the first time this season. Caleb Baragar, who is 5-1 coming out of the bullpen, retired three batters and left after allowing Charlie Blackmon's double leading off the second.
"I can't remember the last time I came in with somebody on base," Webb said. "It was fun out there. I don't know if that changed necessarily the game plan or the mindset of that. It was my first time experiencing that and it was cool."
Kapler felt using an opener helped get Webb locked in more easily.
"I think it did a lot for his mindset," Kapler said. "After Baragar set the tone for us by pounding the strike zone, Logan was able to see how important it was to attack the strike zone. He was comfortable inducing contact, and some of that contact was hard. That's OK. But I think what allowed him to be efficient was his willingness to live with that contact."
Castellani (1-4) walked five and allowed five runs in 4 2/3 innings.
"His challenge moving forward as a major league pitcher is to command the fastball and get the ball-strike ratio much better," Black said. "You've seen over the course of his outings, the pitch count rise. Big league hitters have a discernible eye, much more so than a minor league hitter. He's learning that firsthand."
Rockies third baseman Ryan McMahon made a spectacular catch in foul territory in the fourth. McMahon initially ran through the coaching box chasing Joey Bart's high popup into the swirling wind at Oracle Park, then abruptly changed direction and dove back toward third base to snag the ball. McMahon was starting in place of seven-time Gold Glove third baseman Nolan Arenado, who went on the 10-day injured list Monday with left AC joint inflammation and a left shoulder bone bruise.
MORE DEFENSIVE GEMS
Longoria and Giants shortstop Brandon Crawford also made a handful of standout plays, most notably Crawford's grab of Blackmon's hard liner in the fourth when San Francisco was in a defensive shift, leaving Crawford alone on the left side of the infield.
Rockies: OF David Dahl will seek an opinion on his strained right shoulder from a doctor in Birmingham, Alabama, in the clinic of Dr. James Andrews. Black said Dahl doesn't know whether he injured himself on a throw or a swing. Dahl was placed on the 45-day injured list and the Rockies selected the contract of RHP Tommy Doyle from their alternate site. ... RHP Scott Oberg, sidelined by blood clots in his pitching arm, underwent surgery for thoracic outlet syndrome. The surgery was performed by Dr. Darren B. Schneider at Penn Medicine in Philadelphia. "We're very hopeful that will help Scotty to have another go at a big league season and beyond," Black said. "The hope is and we have faith that he will be ready to go by spring training."
Giants: Tests revealed OF Luis Basabe, placed on the 10-day injured list, sustained a Grade 1 right hamstring strain running to first base Tuesday night. Kapler called it a "three- to four-week injury." ... The Giants recalled OF Steven Duggar from their Sacramento alternate site to fill the void. ... OF Mike Yastrzemski, who had missed five straight games with a mild right calf strain, was going to go through all his pregame work before the Giants determined if he could be a pinch-hit option off the bench.
Colorado RHP Chi Chi Gonzalez (0-2, 7.53 ERA) starts the series finale Thursday afternoon. Gonzalez is winless in three career starts against San Francisco. The Giants had not announced a scheduled starter.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
Acuna plays a big part in Richards' rough first inning
Ronald Acuna Jr. opens the game by ripping a double to left field and scores on a single by Jake Lamb.
MLB bringing back in-game video for players in 2021
Major League Baseball has cleared the way for the return of in-game video on dugout iPads beginning on opening day, with catcher signals obscured by a computer program.
New mercy rule bails RHP Garrett Richards out of first-inning jam in spring debut for Boston Red Sox
With the bases loaded, and pitcher Garrett Richards struggling in his spring training debut, the Boston Red Sox cashed in on a new mercy rule, allowing them to end the inning against the Atlanta Braves on Monday.
Bauer strikes out two in Dodgers' debut
Trevor Bauer fans two batters in as many innings in his Dodgers spring training debut.
DJ Stewart crushes two-run homer off of Nola
Orioles' DJ Stewart takes Aaron Nola deep over the wall in his first at-bat of the spring.
Cole gives up a run, strikes out one in spring training debut
Gerrit Cole pitches one inning in his spring training debut, giving up a run and ending the inning with a strikeout.