PITTSBURGH (AP) Left-hander Francisco Liriano hit the first home run of his 10-year career and Andrew McCutchen went 3 for 3 as the Pittsburgh Pirates held on to beat the Los Angeles Dodgers 6-5 on Saturday.

Liriano hit a three-run shot in the second inning in his 160th career at-bat to put the Pirates ahead 4-2. However, he could not hold the lead as he wound up allowing four runs in three innings.

McCutchen is 13 for 29 (.448) with nine RBIs and 10 runs scored in his last nine games. He has been on base in 14 of his last 18 plate appearances.

More from FoxSports

Neil Walker had two hits for the Pirates, including a home run.

The Dodgers got within a run on Scott Van Slyke's RBI double with one out in the ninth but Mark Melancon held on for his major league-leading 35th save.

Yasiel Puig followed Van Slyke and was originally ruled safe on a throwing error by third baseman Aramis Ramirez but was called out following a video replay.

Joc Pederson then walked before Melancon struck out Yasmani Grandal to end it.

The Pirates won for the 13th time in their last 16 home games and improved to 33-14 against NL West teams over the last two seasons while maintaining a four-game lead over the Chicago Cubs in the NL wild card standings.

The Dodgers' Adrian Gonzalez had three hits. Van Slyke had two hits and two RBIs while Kike Hernandez hit a two-run home run and Howie Kendrick and Alex Hernandez had two hits each.

The Dodgers lost for the just the second time in nine games and stayed three games ahead of the San Francisco Giants in the NL West. Los Angeles is 23-31 against the NL Central and 2-7 versus the Pirates over the last two seasons.

Joe Blanton (3-2) pitched three scoreless innings for his first win since the Pirates acquired him from the Kansas City Royals in a trade on July 30.

Mat Latos (4-8) was tagged for six runs and seven hits in four innings in his second start for the Dodgers since joining them July 30 from the Miami Marlins in a three-team trade that also included the Atlanta Braves. He walked one and had no strikeouts.

Latos allowed one run in six innings in his Dodgers' debut last Sunday, a no-decision against the Los Angeles Angels.

The Pirates pulled in front for good at 6-4 with a two-run third. McCutchen doubled and scored on Jung Ho Kang's ground out before Walker hit his 11th homer.

Hernandez's home run, his fourth, had tied the game in the top of the third.

Van Slyke and McCutchen traded RBI singles in the first inning then the Dodgers went ahead 2-1 the second on Gonzalez's run-scoring single.

Liriano put the Pirates on top 4-2 with his home run, an opposite-field drive to left.

PLAY OF THE DAY

Puig showed off his strong arm in right field for a force out at second base in the first inning.

Gregory Polanco led off with a single and Starling Marte followed with what appeared to be a single. However, Puig came up firing and let go a laser throw to shortstop Jimmy Rollins in time to force the speedy Polanco.

PIRATES PITCHERS POWER

Liriano became the second Pirates pitcher to homer this season as A.J. Burnett connected against the St. Louis Cardinals on July 11. The last time two Pirates pitchers homered in the same year was 2003, when Kip Wells and Jeff D'Amico went deep.

UP NEXT

Dodgers: LHP Alex Wood (7-7, 3.65) starts Sunday night's series finale, his second outing for the Dodgers since being acquired from Atlanta in the July 30 trade. He lost at Philadelphia on Tuesday, allowing four runs in 6 1-3 innings.

Pirates: RHP Charlie Morton (7-4, 4.19) ended a six-start winless streak last Sunday with seven shutout innings at Cincinnati.