Updated

Pittsburgh, PA (SportsNetwork.com) - Gregory Polanco fueled Pittsburgh's offense with a home run, three RBI and three runs scored as the Pirates defeated the Los Angeles Dodgers, 12-7, in the second meeting of a three-game series on Tuesday.

Neil Walker also homered and drove in three runs, while Russell Martin and Ike Davis each brought in two runs for the Pirates, who have won four of their last five games.

Vance Worley (3-1) earned the win after giving up four runs -- one earned -- on seven hits with five strikeouts over six innings.

"We just kept scoring and playing. I think Worley pitched through some challenges," said Pirates manager Clint Hurdle.

Adrian Gonzalez finished 2-for-4 with a home run and three RBI and A.J. Ellis supplied a two-run single for Los Angeles, which had its two-game winning streak come to an end.

Paul Maholm (1-5) was tagged with the loss after giving up two runs on two hits in relief of Josh Beckett, who gave up four runs on six hits across 3 2/3 frames in his return from the disabled list.

"It was a battle," Beckett said. "I put guys in bad situations. Our bullpen doesn't deserve that. This loss pretty much falls on me."

The Pirates opened the scoring in the second after Walker crushed a hanging curveball to deep right. Two batters later, Davis sent an 0-1 fastball into the seats in right-center field for a 2-0 lead.

In the third, Beckett reached second on third baseman Pedro Alvarez's throwing error and moved to third on Dee Gordon's sacrifice bunt. Justin Turner walked to place runners at the corners before Gonzalez's sac fly to deep right scored Beckett. Matt Kemp singled and Andre Ethier tied the game with an RBI double.

Polanco stroked a towering, one-out blast to right in the home half. Travis Snider singled up the middle and hustled home two batters later on Walker's double to restore Pittsburgh's two-run lead.

Los Angeles tied the game again in the sixth. Carl Crawford and Juan Uribe both singled and moved up a base on third baseman Josh Harrison's throwing error. Ellis' base hit to center plated both runners to knot the game at 4-4.

Pittsburgh went ahead with four runs in the bottom half. Martin and Davis led off with consecutive singles off Maholm and Gabby Sanchez worked a two- out walk to load the bases off Jamey Wright. Polanco drove in two runs with a single into shallow left and Snider followed with an RBI single.

Andrew McCutchen was hit by a pitch to reload the bases, then Polanco raced home on Wright's wild pitch for an 8-4 advantage.

Pittsburgh reliever Justin Wilson and Hurdle were both ejected from the game after Wilson hit Turner with a pitch to open the seventh. Gonzalez then greeted Jared Hughes with a two-run blast to right-center field.

Scott Van Slyke's pinch-hit blast cleared the left-field wall to get the Dodgers within 8-7 in the eighth.

The Pirates ensured the win with four runs in the home half. Chris Perez walked four straight Pirates to usher in the first run. Martin welcomed reliever Brandon League by driving in two runs with a base hit to right and Davis accounted for the final score with an RBI single to right.

Game Notes

Alvarez left the game with left knee discomfort after running the bases in the fourth ... Walker extended his hitting streak to six games ... Beckett missed just over two weeks with a left hip impingement ... The Pirates have won seven of their last eight games at PNC Park ... Pittsburgh leads the season series, 4-2.