Liriano was masterful, working seven innings, allowing only two runs and five hits. After allowing a run in the first, Liriano retired 16 straight -- nine of them via strikeout, at one point five in a row. Mark Melancon broke the Pirates' club record for saves in a season by slamming the door in the ninth for his 47th save; the previous record was held by Mike Williams in 2002.
"It's pretty special, to do this for a team with such a rich history. But it's really a team accomplishment, as I've said before," said Melancon, who called No. 47 one of the most important, and not only because it broke the record. "Oh, yeah. An awesome job by Liriano. He made some big pitches"
Kershaw allowed more than one run for the first time since Aug. 7, which was also against the Pirates. He lasted seven-plus innings, allowing seven hits and three runs, and the loss was his first since June 27. Ramirez's big hit came with runners on the corners after the Dodgers chose to intentionally walk Andrew McCutchen, who had driven in the first two Pittsburgh runs with a double in the third.
"I thought [Kershaw] was pretty good. Just another good lineup. His last two starts have been lineups that battle," Dodgers manager Don Mattingly said. "They're not where they're at for no reason. You've got to run through that set of righties and you've got to fight for every out. That's what Clayton had to do."
The Dodgers' magic number in the National League West dropped to 7 after a loss by the Giants earlier in the day, and the Pirates remained one game ahead of the Cubs for the first Wild Card spot in the NL, with a magic number of 4 to clinch a playoff berth.
MOMENTS THAT MATTERED Juggling act: The Pirates lead the Majors in double plays, but one that got away in the seventh was costly. With a man on first and none out, shortstop Jordy Mercer fielded Alex Guerrero's grounder but briefly juggled the ball before flipping for a force to second baseman Neil Walker, whose relay to first was an instant shy of doubling up Guerrero. That resulted in the tying run two batters later when A.J. Ellis' RBI double made it 2-2.
Mc-Clutch-en: Desperate for a big hit, the Pirates got it with two outs in the third from a likely source: McCutchen's slicing drive into the right field corner for a two-run double and a 2-1 lead. The hit gave McCutchen 95 RBIs, one short of the personal high established in 2012.
"I don't know if frustrating is the right word, but you don't want to give up two runs when you have two strikes on a guy," Kershaw said.
"That was two of the best players in the game matching up," Pirates manager Clint Hurdle said. "A big hit. Cutch stayed on a good pitch. It was a big swing of the bat to get us back on top." More >
Welcome back: A bright spot for the Dodgers was in the first inning as Howie Kendrick contributed in his first game in over a month due to a strained hamstring. The first ball of the game was hit to him in the first, which Kendrick fielded cleanly, then he slapped the ball the other way for a single to drive home a run in the bottom of the frame.
Managerial chess: While Ramirez made the Dodgers regret an intentional walk in the eighth, the Pirates used an intentional walk to get out of a jam in the seventh. After the Dodgers tied the game in the seventh, the Pirates intentionally walked Chris Heisey to load the bases to get to Joc Pederson. Dodgers manager Don Mattingly pinch-hit Austin Barnes to get the platoon advantage, only for the rookie catcher to ground into a 6-4-3 double play to end the threat.
TURNER LEAVES WITH KNEE SORENESS
Dodgers third baseman Justin Turner was removed from Saturday's game before the seventh inning due to left knee soreness; he was replaced by Guerrero. The club tries to limit Turner to four or five games a week to keep his knees fresh. Turner had played in five consecutive games earlier in the week before getting off-days on Wednesday and Thursday, and he said afterward that he likely wouldn't play in Sunday's series finale. More >
"Frustrating there, too. I knew that was my one batter the whole time and I didn't do my job. It cost us the game," -- Kershaw on giving up a leadoff double to Gregory Polanco in the eighth, which was the go-ahead run
"I was going to do whatever I had to do to get that ball. If I don't and the ball gets by, that's the tying run in scoring position." -- Polanco, on running into the railing in the right field corner to snare Justin Ruggiano's drive with one out in the eighth.
"It definitely wasn't deflating." -- Hurdle, on the emotional impact of snapping a four-game losing streak with a one-run road victory in a game started by Kershaw.
WHAT'S NEXT Pirates:Gerrit Cole can run his record in California starts to 5-0 when he takes the ball on Sunday at 4:10 p.m. ET in the series finale. Cole allowed three runs in 6 1/3 innings to win his only prior Dodger Stadium start, on May 29, 2014.
Dodgers:Mike Bolsinger gets the ball for the 1:10 p.m. PT start on seven days' rest, and he's coming off his shortest outing of the season. Bolsinger lasted just 3 2/3 innings against the D-backs last Sunday and earned a no-decision. With the Dodgers designating Mat Latos for assignment, Bolsinger figures to be the No. 5 starter for the rest of the season for Los Angeles.
Tom Singer is a reporter for MLB.com and writes an MLBlog Change for a Nickel. He can also be found on Twitter @Tom_Singer and on his podcast. Steve Bourbon is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.