Updated

Garrett Jones clubbed a pair of three-run home runs to power the Pittsburgh Pirates past the Los Angeles Dodgers, 10-6, Thursday at PNC Park.

Clint Barmes knocked in three runs and Pedro Alvarez added a solo shot among his three hits, as Pittsburgh salvaged the finale of this four-game set and snapped a nine-game losing streak against the Dodgers.

A.J. Burnett (15-4) allowed six runs on seven hits and one walk while striking out seven over 6 2/3 innings to earn the victory, becoming Pittsburgh's first 15-game winner since Todd Ritchie went 15-9 back in 1999.

"He was laying it all out there," said Pirates manager Clint Hurdle of Burnett. "It was gritty all over the place today for us."

Joe Blanton (8-11) absorbed the loss after giving up eight runs on seven hits and four walks through 4 1/3 frames to remain winless in three starts since being acquired from Philadelphia on Aug. 3.

Hanley Ramirez and James Loney each homered for Los Angeles, which lost for just the second time in its last eight games.

The Pirates struck in their first at-bat, as Jordy Mercer reached on a fielder's choice and Andrew McCutchen walked before Jones scorched a change-up into the right-field seats to give the home team a 3-0 lead.

The Dodgers countered in the second, but only after losing their center fielder Matt Kemp and manager Don Mattingly when both were ejected from the game during Andre Ethier's at-bat.

Kemp began barking at home plate umpire Angel Campos from the dugout before Campos tossed him for arguing balls and strikes. Kemp sprang from the dugout and had to be restrained by teammates before eventually leaving the game.

Mattingly then continued the argument with Campos before first base umpire Tim Tschida tossed the Dodgers skipper as well.

"It was unusual," said Mattingly of Kemp's ejection. "Matt got thrown out today for cheering for Andre. You can't get thrown out for cheering for your teammate. That's unacceptable behavior for me. It needs to go to the league."

Once the dust had settled, Ethier and Ramirez each grounded out before Loney launched a first-pitch fastball into the right-field seats to bring the visitors within 3-1.

Kemp's replacement, Elian Herrera, then helped plate the Dodgers' second run in the fourth as Mark Ellis smacked a ground-rule double down the left-field line before Herrera dropped down a bunt.

Alvarez fielded the bunt, but fired wide of first, allowing Ellis to score to make it a one-run contest.

Ethier then grounded into a fielder's choice before Ramirez crushed a first- pitch fastball over the wall in right-center field to put the Dodgers on top.

Barmes' RBI triple to center tied the game in the bottom half before Jones' second homer of the day gave the Pirates a 7-4 lead in the fifth.

Mercer singled, McCutchen walked, and Jones followed with a towering shot into right-center field to put the Pirates in front.

After Gaby Sanchez grounded out, Alvarez belted a curveball into the foliage in center field to extend the lead to 8-4 and chase Blanton from the game.

LA added a pair of two-out runs in the seventh on Ellis' RBI single and a bases-loaded hit-by-pitch, but Pittsburgh responded in the bottom half when Barmes ripped a bases-loaded single through the left side to plate a pair and restore the Pirates' four-run lead.

Jason Grilli then kept the Dodgers off the board in the eighth and Joel Hanrahan fired a scoreless ninth to nail down the victory.

Game Notes

Ramirez's home run was the 150th of his career ... Blanton has given up 24 homers this year ... Mattingly has been ejected six times this season ... Barmes' triple was his first since June 4, 2009 at Houston ... Pittsburgh improved to 35-12 when scoring the first run of the game.