SAN FRANCISCO -- The Colorado Rockies are determined to do anything to stay in a crowded National League playoff race.
The San Francisco Giants know they can't miss any more opportunities with the powerful Padres coming to town to close out the season.
Raimel Tapia hit a go-ahead sacrifice fly in the 11th inning, and the Rockies rallied to keep contending San Francisco from gaining ground in the NL wild-card race by beating the Giants 5-4 on Thursday.
"That's definitely a tough loss right there, especially thinking that we had that one in the bag," Giants first baseman Brandon Belt said. "We let up a little bit too early. We needed to keep pushing as an offense and we didn't. We ended up paying for it."
The Giants (28-28), winners of three of their last five, dropped behind idle Cincinnati for the first NL wild card. The Reds (29-28) visit Minnesota over the final weekend as the playoff-bound Padres come to San Francisco. Eight NL teams were still in the mix for four remaining postseason spots entering play Thursday.
Trevor Cahill (1-2) took the loss after San Francisco had a chance in the 10th.
Belt -- who homered in the eighth inning to tie the game on his 1,000th career hit -- and Brandon Crawford were intentionally walked by Daniel Bard (4-2). The infield drawn in, shortstop Trevor Story fielded Evan Longoria's grounder and threw Alex Dickerson out at home as San Francisco failed to capitalize.
"Tough play, it's just very instinctual. You really don't have time to think about it, you just kind of try to set yourself up before the play," Story said. "Longo hits the ball really hard, he hits it at me a lot really hard so I was kind of ready for that."
Kevin Gausman struck out nine over six innings and Crawford hit an RBI double, but the Giants' bullpen couldn't hold it.
Gausman matched his second-most strikeouts of the season -- he had 11 against Oakland on Aug. 15 -- walked one, and allowed two runs on eight hits. He bounced back with a strong outing on the heels of a loss at Oakland his last time out following consecutive winning starts.
The Giants added another run on a wild pitch by Colorado right-hander Chi Chi Gonzalez in the second. Gonzalez is now winless in four career starts against San Francisco.
Ryan McMahon got Colorado on the board with an RBI double in the fourth, then Tapia singled in a run four batters later.
Colorado had two runners on in both the first and second innings but missed scoring chances.
THE WHOLE STORY
Story's steady glove in the 10th made a difference for Colorado.
"That's the play that you have to make. You bring the infield in, you try to cover as many spots on the infield as you can to prevent the ground ball from beating you," Rockies manager Bud Black said. "You bring the outfielders in a little tight, you space them where our spray charts think that the hitter's going to hit the ball, same on the infield, we had three infielders on the left side and two on the right. It's something we practice in spring training."
DICKERSON VS. ROX
Dickerson doubled in the first as he continued to deliver against the Rockies.
In 10 games this season facing Colorado, Dickerson went .462 (18 for 39) with 12 runs, seven doubles, six homers and 10 RBI.
VISITING THE BAY
The Rockies won the season series 6-4. Colorado went 2-2 at Oracle Park and hasn't had a winning record in San Francisco since going 6-3 in 2015. The Rockies are 17-26 at Oracle Park since the start of the 2016 season.
Giants: OF Mike Yastrzemski, who missed his sixth straight start with a mild right calf strain, flied out as a pinch-hitter to start the 10th. He again went through pregame baseball work on the field to show the Giants he was ready off the bench. He could be back in the starting lineup as soon as Friday, manager Gabe Kapler said. ... RHP Jeff Samardzija (shoulder) is in the mix for a return Friday. He is 0-2 making just three starts this season and hasn't pitched since Aug. 7. "Starting a game is on the table for us. He's out on the field playing catch preparing for that possibility," Kapler said. ... The Giants continue to monitor RHP Johnny Cueto's sore hip. "He came out of his last start feeling good. We have no concerns about him making his next start," Kapler said.
San Francisco hosts San Diego in a doubleheader Friday with Tyler Anderson (3-3, 4.53 ERA) starting one of the games.
Colorado sends RHP Antonio Senzatela (5-2, 3.13) to the mound for the first game of Friday's doubleheader at Arizona.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
The MLB teams with the most serious work still to do this offseason
The Mets did their work by adding Francisco Lindor. Now, the spotlight moves to those who have big holes to fill. Enter the Twins, Phillies, Blue Jays and Red Sox.
Former Oakland Athletics pitcher Dave Stewart bids $115 million on share of Oakland Coliseum
Former Athletics pitcher Dave Stewart submitted a bid to buy a share of the Oakland Coliseum with plans to develop the site should the A's leave the ballpark.
Tri-City ValleyCats suing Major League Baseball, Houston Astros
The Tri-City ValleyCats, who operated as a short-season affiliate of the Houston Astros for 18 seasons before being dropped, have filed a lawsuit against Major League Baseball and the Astros.
LHP Martin Perez returns to Boston Red Sox on one-year deal, source says
Veteran starter Martin Perez has agreed to a one-year, $5 million guaranteed contract to return to the Boston Red Sox, a source confirmed to ESPN's Jeff Passan.
Baltimore Orioles reach one-year deal with recovering Trey Mancini
— The Baltimore Orioles agreed to a $4.75 million, one-year deal with recovering slugger Trey Mancini on Friday but haven't come to terms yet with outfielder Anthony Santander.
New York Yankees roll dice on Corey Kluber: Will he return to Cy Young form?
If the longtime ace bounces back from two injury-plagued seasons, New York might have just reeled in one of the biggest fish of this offseason.