SAN FRANCISCO (AP) Matt Duffy's dinner date with his girlfriend and her family was in jeopardy when he delivered in a key moment for the San Francisco Giants.
Duffy hit a game-ending RBI double with two out in the 13th inning, sending the Giants to a 2-1 victory over the Colorado Rockies on Saturday.
''It can be pretty demoralizing if you spend that much time, that much focus, that much energy and that much of your bullpen on a game like today and then you come out with a loss,'' Duffy said. ''That makes it all worth it when you get something out of it.''
Pinch hitter Conor Gillaspie set up the winning swing with a one-out walk against Justin Miller (1-1). After Denard Span walked and Joe Panik struck out swinging, Duffy lined a 1-0 pitch from Miller past Gerardo Parra in left for his second hit of the day.
That left Duffy just a little over an hour to get to his dinner date some 40 miles away.
''What a great game,'' Giants manager Bruce Bochy said. ''We're down to our last pitcher, so it's harder to get a bigger hit than Duffy got today.''
Derek Law (1-0) pitched a scoreless inning for his first major league win and San Francisco's fifth victory in seven games. Brandon Crawford had two hits and drove in a run.
The teams combined for 19 hits and 14 pitchers in a game that lasted 4 hours, 20 minutes.
Parra, Charlie Blackmon, DJ LeMahieu and Trevor Story had two hits apiece for the Rockies, who have dropped four of six.
''A lot of good play on both sides and they got the big hit at the end,'' Rockies manager Walt Weiss said.
Colorado almost had a rally going in the top half of the 13th when Nolan Arenado walked and Parra followed with a bouncer up the middle. But Panik made a diving stop and an overhead flip with his right hand for the inning-ending force at second.
Arenado was initially ruled safe, but the Giants challenged and the call was overturned on replay.
''That was huge,'' Duffy said. ''The position he was in, laying on the ground, I didn't think he was going to be able get a throw off anywhere, let alone an out.''
The game was scoreless until the 10th.
The Rockies broke the drought when LeMahieu tripled past a diving Span in center and scored on Tony Wolters' one-out double. San Francisco tied it on Crawford's single in the bottom of the inning.
Both starting pitchers were long gone when the game ended.
Colorado rookie Jon Gray pitched seven innings of one-hit ball. He struck out five and walked two while extending his scoreless streak to 12 innings, but remained winless in 13 career starts.
Johnny Cueto allowed eight hits in 8 1/3 innings for San Francisco. He struck out three and walked one.
DEFENDING THE DIVE
Cueto made a nice play to retire Wolters on a short dribbler in the sixth and avoided what could have been a serious leg injury when Wolters tried to dive between the pitcher's legs near first base.
''I really don't know what the catcher was trying to do,'' Cueto said through an interpreter. ''I think he was just trying to get me out of my game. I felt it a little bit because I got hit but after a while it just went away.''
SHUFFLING THE ORDER
Bochy has put his pitchers in the eighth spot of the batting order for most of the season, but has dropped them back to ninth while Angel Pagan recovers from a sore left hamstring. When healthy, Pagan has batted ninth.
''I can still do it with (Gregor) Blanco,'' Bochy said. ''But I'm going to go the conventional route for now.''
Giants: Bochy said the team is hopeful Pagan can return to the lineup early next week. If not, then it is possible Pagan could be headed for the disabled list.
Rockies: RHP Eddie Butler (0-1) pitches Sunday and is unbeaten in two career starts against San Francisco.
Giants: RHP Jeff Samardzija (4-1) has won three consecutive games for the first time in his career heading into the series finale against Colorado.
This story corrects to Brandon Crawford had an RBI single in the 10th inning instead of a sacrifice fly.