Everth Cabrera crossed the plate with the go-ahead run in the top of the seventh inning on a two-run throwing error by Jerry Hairston Jr. and the San Diego Padres knocked off the Los Angeles Dodgers, 7-2, in the rubber match of a three-game set Sunday.

Chase Headley hit a solo home run, Alexi Amarista laced an RBI single and Yonder Alonso also had an RBI single among his two hits for the Padres, who won the final two games of the series following a four-game skid. Cameron Maybin added three hits in the victory.

Jason Marquis (2-5) was strong, allowing two runs on six hits and three walks with a pair of strikeouts in six innings. He had lost his last four decisions against Los Angeles.

"Jason was more deliberate between pitches. He did a good job today," Padres manager Bud Black said of his starter. "We got some good at-bats from a number of guys. The last three innings our offense and pitching was outstanding."

Andre Ethier went 2-for-4 with an RBI single and Hairston added an RBI base hit in the loss for the Dodgers, who committed a season-high five errors en route to their fifth loss in six games.

Chris Capuano (9-5) got the start in place of Chad Billingsley, who was scratched prior to the game, and allowed four unearned runs on five hits and a walk with three strikeouts over 6 2/3 innings.

"Cap (Capuano) was good, he kept us there," Dodgers manager Don Mattingly said. "We're a better defensive club than this. This series was a little tough."

Trailing, 2-1, heading into the seventh, the Padres plated three runs to take control of the game for good with some help from a pair of errors by Hairston in the frame.

After Carlos Quentin and Alonso made the first two outs, Maybin reached on Hairston's first error -- a wild throw over the head of first baseman James Loney. Cabrera followed with a single and John Baker drew a walk to load the bases. Pinch-hitter Yasmani Grandal hooked one sharply down the third base line and Hairston made a diving stop, but his second error of the frame came on the throw when he again air-mailed Loney, which allowed Maybin and Cabrera to score.

Amarista then ripped a ball off the leg of Dodgers reliever Josh Lindblom for a single, bringing home Baker for a 4-2 advantage.

Headley took Lindblom deep down the right field line for a solo shot leading off the eighth and the Padres padded their lead further in the ninth on a sacrifice fly by Quentin and an RBI base hit by Alonso to cap the scoring.

"I hit that one all right," Headley said of his home run. "It's nice to see that with the work I've put in. I've worked on driving pitches."

Earlier, the home side jumped on top with a run in the first inning. Tony Gwynn Jr. led off the frame with a base hit and stole second before Mark Ellis walked. Ethier then came through with a single through the right side to bring home Gwynn for the 1-0 Los Angeles lead.

Logan Forsythe began the San Diego fourth with a solid base hit back through the box and Headley singled to put two runners on base. Quentin slapped a ground ball to shortstop for what should have been a double play, but Ellis threw the ball away on the relay to first, allowing Forsythe to score the tying run.

Hairston came through with a clutch RBI single in the sixth to give the Dodgers a 2-1 lead, but his errors in the seventh essentially cost LA the game.

Game Notes

Los Angeles had taken eight of the last 11 games from the Padres this season and 18 of 23 dating back to July 8, 2011...The Dodgers fell to 11-4 against San Diego since the beginning of the 2011 campaign...The two teams combined for seven errors...The five miscues by the Dodgers were the most errors committed in a home game since 2008...Dodgers outfielder Matt Kemp, who made his return to the lineup on Friday, was given the day off...The Dodgers welcome the Philadelphia Phillies for three games beginning on Monday, while the Padres will open a four-game series against Houston on Monday.