Chase Headley homered for the second straight game, and the San Diego Padres used six unearned runs to beat the Los Angeles Dodgers 7-2 on Sunday.

Cameron Maybin and Everth Cabrera scored the tying and go-ahead runs on third baseman Jerry Hairston Jr.'s second throwing error of the seventh inning.

The Padres were trailing 2-1 with nobody on and two outs in the seventh when Hairston gave them life with his first error on a grounder by Maybin. Cabrera followed with a single, and a walk to John Baker loaded the bases.

Yasmani Grandal batted for starting pitcher Jason Marquis, and Hairston's hurried throw on his grounder down the line sailed past first baseman James Loney as two runs scored.

Marquis (2-5) allowed two runs and six hits in six innings. He had been 0-4 with a 4.60 ERA in his previous five outings.

Chris Capuano (9-5) was charged with four runs — all of them unearned — and five hits in 7 2-3 innings after his infield committed four errors behind him, all on poor throws. The left-hander, pitching on six days' rest because of the All-Star break, was bumped up a day after scheduled starter Chad Billingsley was scratched with elbow soreness.

Hairston's RBI single in the sixth had given the Dodgers a 2-1 lead. Then everything fell apart in the seventh.

After Hairston's second error, Josh Lindblom relieved Capuano, and Chris Denorfia singled home another run to give the Padres a 4-2 lead. Headley added his 10th homer leading off the eighth against Lindblom.

Andre Ethier, who homered and drove in four runs Saturday night in the Dodgers' 7-6 loss, gave Los Angeles a 1-0 lead with a run-scoring single in the first. It increased his team-high RBI total to 60 in 78 games — just two fewer than he had in 135 games last season, when he missed the final 20 games because of a knee injury that required surgery.

The Padres tied it in the fourth with an unearned run after Logan Forsythe and Headley opened the inning with singles. Carlos Quentin followed with a fielder's choice grounder to short, but second baseman Mark Ellis threw wildly past first trying to complete a double play and Forsythe was able to score.

Reliever Jamey Wright committed the Dodgers' season-high fifth error of the game with he mishandled Alexi Amarista's sacrifice bunt in the eighth.

NOTES: The Padres took two of three from the Dodgers after getting swept in each of their last three three-game series at Chavez Ravine. ... Dodgers CF Matt Kemp, who was 5 for 9 in his first two games off the disabled list, got the day off. ... With SS Dee Gordon on the disabled list, Dodgers manager Don Mattingly gave slumping 3B Juan Uribe his first start at short since May 4 of last season.