Mauricio Dubón 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.

Evan Longoria also went deep for San Francisco. Brandon Belt added three hits and walked twice.

More Images
San Francisco Giants' Alex Dickerson, right, is congratulated by Evan Longoria (10) after scoring on a sacrifice fly by Brandon Crawford during the fifth inning against the Colorado Rockies in a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

Mauricio Dubón 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.

San Francisco Giants' Mauricio Dubon hits a three-run home run against the Colorado Rockies during the fifth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

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.

San Francisco Giants' Mauricio Dubon points to the sky as he crosses home plate after hitting a three-run home run against the Colorado Rockies during the fifth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

Longoria homered off Castellani leading off the fourth to snap an 0-for-16 slide.

San Francisco Giants' Mauricio Dubon gives a virtual high-five to third base coach Ron Wotus (23) after hitting a three-run home run against the Colorado Rockies during the fifth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

Castellani (1-4) walked five and allowed five runs in 4 2/3 innings.

Colorado Rockies third baseman Ryan McMahon makes a diving catch on a pop foul by San Francisco Giants' Joey Bart in front of Giants third base coach Ron Wotus during the fourth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

MORE DEFENSIVE GEMS

Colorado Rockies starting pitcher Ryan Castellani throws to a San Francisco Giants batter during the fourth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

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.”

Colorado Rockies' Raimel Tapia (15) points to a teammate after scoring on a single by Trevor Story against the San Francisco Giants during the third inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

Colorado RHP Chi Chi González (0-2, 7.53 ERA) starts the series finale Thursday afternoon. González is winless in three career starts against San Francisco. The Giants had not announced a scheduled starter.

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.

San Francisco Giants' Alex Dickerson, right, is congratulated by Evan Longoria (10) after scoring on a sacrifice fly by Brandon Crawford during the fifth inning against the Colorado Rockies in a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

San Francisco Giants' Alex Dickerson, right, is congratulated by Evan Longoria (10) after scoring on a sacrifice fly by Brandon Crawford during the fifth inning against the Colorado Rockies in a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

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.

Raimel Tapia had two hits and an RBI for Colorado.

Dubón’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 this career.

San Francisco Giants' Mauricio Dubon hits a three-run home run against the Colorado Rockies during the fifth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

San Francisco Giants' Mauricio Dubon hits a three-run home run against the Colorado Rockies during the fifth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

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.

Webb gave up an RBI single to Trevor Story in the third and Tapia’s RBI double over the outstretched glove of left fielder Alex Dickerson in the fifth.

San Francisco Giants' Mauricio Dubon points to the sky as he crosses home plate after hitting a three-run home run against the Colorado Rockies during the fifth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

San Francisco Giants' Mauricio Dubon points to the sky as he crosses home plate after hitting a three-run home run against the Colorado Rockies during the fifth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

Castellani (1-4) walked five and allowed five runs in 4 2/3 innings.

ARENADO-ESQUE

Black had to be smiling after third baseman Ryan McMahon made a spectacular diving 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 on Monday was put on the 10-day injured list with left AC joint inflammation and a left shoulder bone bruise.

San Francisco Giants' Mauricio Dubon gives a virtual high-five to third base coach Ron Wotus (23) after hitting a three-run home run against the Colorado Rockies during the fifth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

San Francisco Giants' Mauricio Dubon gives a virtual high-five to third base coach Ron Wotus (23) after hitting a three-run home run against the Colorado Rockies during the fifth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

MORE DEFENSIVE GEMS

Longoria and Giants shortstop Brandon Crawford also made a handful of defensive gems, 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.

TRAINER’S ROOM

Colorado Rockies third baseman Ryan McMahon makes a diving catch on a pop foul by San Francisco Giants' Joey Bart in front of Giants third base coach Ron Wotus during the fourth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

Colorado Rockies third baseman Ryan McMahon makes a diving catch on a pop foul by San Francisco Giants' Joey Bart in front of Giants third base coach Ron Wotus during the fourth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

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. Manager Gabe 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. “We’ll still view him as at least a possibility to hit for us,” Kapler said.

UP NEXT

Colorado Rockies starting pitcher Ryan Castellani throws to a San Francisco Giants batter during the fourth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

Colorado Rockies starting pitcher Ryan Castellani throws to a San Francisco Giants batter during the fourth inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

Colorado RHP Chi Chi González (0-2, 7.53 ERA) starts the series finale Thursday afternoon. González 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

Colorado Rockies' Raimel Tapia (15) points to a teammate after scoring on a single by Trevor Story against the San Francisco Giants during the third inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)

Colorado Rockies' Raimel Tapia (15) points to a teammate after scoring on a single by Trevor Story against the San Francisco Giants during the third inning of a baseball game Wednesday, Sept. 23, 2020, in San Francisco. (AP PhotoTony Avelar)