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
Brian Snitker is NL's top manager after leading Braves to East title
After leading the Braves to an unexpected NL East title, Brian Snitker has been named the NL manager of the year.
Did Ohtani deserve Rookie of the Year?
Around the Horn discuss whether Shohei Ohtani deserved Rookie of the Year even though he only played 104 games this season.
MLB to investigate claims of racial discrimination vs. Mariners
MLB said in a statement provided to The Athletic that it will investigate allegations of racial discrimination in the Seattle Mariners organization made by a former employee.
Time for Giants to decide what to do with Madison Bumgarner
Forget nostalgia. With Farhan Zaidi taking over the front office, San Francisco must re-evaluate how the hero of Octobers past fits into the franchise's future.
Phillies manager Gabe Kapler loses Malibu home in Woolsey Fire
Phillies manager Gabe Kapler is thankful his family is safe after his Malibu home was destroyed in the Woolsey Fire that has burned at least 435 buildings and is threatening tens of thousands more.
Japan scores four runs in 9th to beat MLB All-Stars, leads series 3-1
Japan rallied with four runs in the top of the ninth inning to beat the MLB All-Stars 5-3 and take a 3-1 lead in their six-game exhibition series on Tuesday.