LOS ANGELES -- It was looking all too familiar to the Los Angeles Dodgers. Another lead lost, another reliever buckling in a big moment.
Instead, the relievers came through with four scoreless innings that enabled Brian Dozier's sacrifice fly to finally drive in the winning run in the 12th for a 4-3 victory that snapped a five-game losing streak Wednesday night.
"A big relief to say the least," Dozier said. "A needed win."
The loss ended a three-game winning streak for the Giants, who were looking to sweep the three-game series against their longtime rivals.
"It was a hard-fought series," manager Bruce Bochy said. "It's a tough loss, no question. But you have to look at how we came back, and a lot of good things. We just couldn't quite finish it."
The Dodgers received six scoreless innings from left-hander Hyun-Jin Ryu during his first start in more than three months and took their first lead with a run in the sixth after Yasiel Puig led off with a double. Puig, ejected Tuesday after a scuffle with Giants catcher Nick Hundley, went to third on a flyout and scored on pinch-hitter Joc Pederson's sacrifice fly.
McCutchen's 14th home run came against rookie reliever Caleb Ferguson, and the Dodgers would have to be forgiven if they thought a repeat of the past five games was in the works, with the bullpen taking the loss in each one.
"If that game gets away from us, it's really tough," Turner said. "It's a little bit of a monkey off our shoulders."
Pedro Baez (4-3) threw the final two scoreless innings to earn the win.
Ryu had not pitched since severely injuring his groin on May 2, but he was dominant. The left-hander held the Giants to three hits and struck out six. He did not walk a batter.
"You win with starting pitching," Dodgers manager Dave Roberts said. "Overall our starting pitching has been lights-out. To get him back is a big boost for our team. ... The guy is a big-game pitcher."
SEARCHING FOR OFFENSE
The Dodgers scored only three runs in the first two games of the series and left 17 runners on base Wednesday. As much as their bullpen has struggled lately, so has the lineup.
Still, they remain confident.
"This team is built to win and we're going to put a hot streak together at some point," Kemp said.
"We're still playing good baseball," Dozier said. "Last time I checked, most winning streaks started after a loss."
Giants: SS Brandon Crawford returned to the lineup after sitting out one game in concussion protocol. ... 1B Brandon Belt (hyperextended knee) returned to the lineup. He was activated Tuesday, entered in the eighth when Hundley was ejected and scored the decisive run on a close play at the plate. ... RHP Jeff Samardzija (right shoulder inflammation) threw a 30-pitch simulated game Tuesday and is scheduled to throw to hitters Friday before beginning a rehab assignment.
Dodgers: Placed RHP Ross Stripling on the 10-day disabled list with two compressed disks in his lower back, retroactive to Friday. Stripling said he's had the problem since college. ... LHP Tony Cingrani (left shoulder strain) was transferred to the 60-day DL. ... RHP Daniel Hudson (right forearm strain) is scheduled to come off the disabled list Friday. ... All-Star closer Kenley Jansen (irregular heartbeat) threw a second bullpen. He is scheduled to see his cardiologist on Monday. ... LHP Julio Urias (left shoulder surgery) was scheduled to throw two-plus innings in a rehab start, but lasted only 1 1/3 innings.
Giants: RHP Dereck Rodriguez (6-1, 2.25 ERA) starts Friday when San Francisco opens a three-game series in Cincinnati. The Giants are 9-3 in his past 12 starts.
Dodgers: RHP Walker Buehler (5-4, 3.32) is scheduled to pitch Friday in the opener of a three-game series at Seattle. Buehler has a 2.80 ERA as a starter, limiting opponents to a .211 batting average.
More AP baseball: https://apnews.com/tag/MLBbaseball and https://twitter.com/AP-Sports
Which AL wild-card contenders should go for it before the trade deadline
How aggressive should clubs be in chasing a spot in a one-game playoff? We take a team-by-team look.
MLB Weekend Watch: Aces, races and who we're picking in the biggest games
Will Lucas Giolito and Hyun-Jin Ryu keep their amazing runs going? Are the Rangers for real? And what else are we looking forward to this weekend?
Weary Mariners bullpen looks to regroup against A's
The Seattle Mariners' bullpen isn't exactly providing much relief lately.
Padres take on Rockies, look to snap five-game skid
Colorado Rockies right-hander Jeff Hoffman posted some impressive stats in his past two starts, road games against the Chicago Cubs and New York Mets.
Twins look to keep fun going against Royals
On pace to shatter the major league record for home runs in a season and owners of the best record in baseball, the Minnesota Twins are expecting three sellout crowds for their series with the Kansas City Royals that begins Friday night in Minneapolis.
Ohtani to follow up on history as Angels visit Rays
Shohei Ohtani and Albert Pujols provided the spark for the Los Angeles Angels when the lights went out at Tampa Bay's Tropicana Field on Thursday night.