LOS ANGELES (AP) Francisco Liriano came through with the kind of effort the Pittsburgh Pirates are going to need down the stretch and in the postseason - especially when they face the aces on other teams.
Liriano outpitched reigning NL MVP Clayton Kershaw, and Aramis Ramirez hit a tiebreaking double in the eighth inning as the Pirates ended a four-game skid with a 3-2 victory over the Los Angeles Dodgers on Saturday night.
''Frankie gave us just what we needed,'' manager Clint Hurdle said. ''For me, this was as good a game as he's pitched all year. His fastball played extremely well for him, and the velocity was peak. It was so effective, so tough to lay off of.''
Andrew McCutchen doubled home two runs for Pittsburgh, which climbed within four games of NL Central-leading St. Louis following the Cardinals' 5-4 loss at Chicago. The Pirates remained a game ahead of the Cubs in the race for the first wild card, with both teams comfortably in playoff position.
Despite the Dodgers' sixth loss in 24 games, their magic number for clinching their third straight NL West title dropped to seven because the San Francisco Giants lost 6-0 to Arizona.
Liriano (11-7) allowed two runs and five hits over seven innings, striking out nine and retiring 16 in a row during one stretch. The left-hander is 7-1 with a 3.66 ERA in his last 14 starts.
Liriano also is 4-0 with a 2.73 ERA in five career starts against the Dodgers. His only other start at Chavez Ravine was on May 30, 2014, when he threw 5 2-3 scoreless innings in a 2-1 victory.
''Everything felt good today, and I was able to throw any pitch in any location,'' Liriano said. ''I had my good fastball today, and that helped me with my breaking stuff. So I just tried to go as deep as I can. Getting ahead early in the count is the whole key for me.''
Liriano took a 2-1 lead into the seventh before the Dodgers tied it on an RBI double by A.J. Ellis. But the Pirates regained the lead in the eighth.
Gregory Polanco chased Kershaw (14-7) with a leadoff double and went to third on a groundout before Chris Hatcher intentionally walked McCutchen. Ramirez followed with a drive to the fence in left-center for his 71st RBI.
Tony Watson pitched a perfect eighth and Mark Melancon did likewise in the ninth for his major league-leading 47th save in 49 attempts, breaking the franchise record set by Mike Williams in 2002.
''We've gotten a chance to really watch his peak performance,'' Hurdle said. ''He's had some good seasons in his career, and some down seasons. He was a guy we were able to get, and we felt there was still a lot of good pitching in that arm. Now he's broken the single-season saves record, and he's done it in such an efficient form.''
Even though Williams held the record, Kent Tekulve remains the gold standard among Pirates closers after helping them win a World Series title in 1979. And his guidance has been invaluable to Melancon.
''I've talked with him a lot, and he's a great guy,'' Melancon said. ''He was just a gamer. Every day he was on the bump, and that's the epitome of a rag arm, right there. I'm sure he'd laugh if I said that to him. We have a good relationship. The Pirates have a rich history, so this accomplishment is pretty cool.''
Kershaw was charged with three runs and seven hits in seven-plus innings. He struck out eight, raising his major league-leading total to 272 with three starts left in the regular season. The last time a pitcher fanned at least 300 in a season was 2002, when Randy Johnson did it for the fourth straight year with the Diamondbacks.
Kershaw was 9-0 with a 0.98 ERA in his previous 13 starts since losing at Miami on June 27. The three-time Cy Young Award winner finished the night with a 2.18 ERA, third in the National League. Dodgers teammate Zack Greinke has a major league-best 1.65 mark.
Dodgers second baseman Howie Kendrick, reinstated from the disabled list Friday after missing 34 games because of a strained left hamstring, played for the first time since Aug. 10 and hit an RBI single in the first inning. It was his 10th hit in 20 career at-bats against Liriano.
McCutchen sliced a 3-2 pitch down the right-field line and just inside the chalk to give Pittsburgh a 2-1 lead in the second. The 2013 NL MVP has 95 RBIs, one shy of his career-best total in 2012. He came in with just two RBIs in 21 career at-bats against Kershaw.
''I don't know if frustrating is the right word, but you don't want to give up two runs on a hit when you've got two strikes on a guy,'' Kershaw said.
Dodgers 3B Justin Turner exited after six innings because of left knee soreness.
Pirates: RHP Gerrit Cole (16-8) has allowed only one home run in 54 2-3 innings over his last nine starts.
Dodgers: RHP Mike Bolsinger (6-3) makes his 28th career start and first against Pittsburgh.