SAN DIEGO — Chase Headley was more pleased with a two-run double against left-hander Chris Capuano than he was with surpassing his home run total from last season.

Headley homered, doubled and drove in three runs, and the last-place San Diego Padres rallied to beat the NL West-leading Los Angeles Dodgers 4-2 on Wednesday, helping left-hander Clayton Richard snap his personal five-game losing streak.

Capuano, who had won his previous four starts, took a two-hitter and a 2-1 lead into the sixth inning. Cameron Maybin and Chris Denorfia opened the inning with singles before the switch-hitting Headley doubled into the gap in left-center to score both.

The better at-bat was "definitely the double, because he threw some tough pitches early in that at-bat and I had to fight to get to that pitch, whereas in the first at-bat I just got a mistake over the middle of the plate early and I was able to put a good swing on it," Headley said. "When you drive guys in in big situations, those are the at-bats you come out feeling good about."

Headley homered to left with two outs in the first, his fifth.

He hit only four last season.

"That was kind of a sore spot for me last year," Headley said. "I'm by no means a guy that's trying to hit home runs, but I do feel like I'm going to hit more than four homers most years. To come out and get off to a decent start in that manner, it's nice, but I think more importantly is if you go out there and have good at-bats, for me the home runs are going to come, but the rest of it's going to come as well and that's where I'm trying to focus."

Richard and two relievers combined on a five-hitter as the Padres beat L.A. for only the second time in eight games this season. The Dodgers have lost two straight since Matt Kemp went on the 15-day disabled list with a strained left hamstring.

Richard (2-5) had lost his previous five starts. It was his first win since beating the Dodgers 8-4 at home on April 8, helping the Padres avoid a season-opening, four-game sweep. He held the Dodgers to two runs and four hits over seven innings Wednesday, struck out six and walked none. Dale Thayer pitched the ninth for his fourth save in as many chances after Andrew Cashner struck out the side in the eighth.

"Winning feels a lot better," Richard said.

Not having to face Kemp "definitely changes the lineup," Richard said. "He's an elite player, probably the best of the best. That would change any lineup. You never want to see anybody miss because of an injury but that definitely changes the lineup."

Said manager Bud Black: "I think we saw through seven innings what we've seen at times during his starts. Today the difference was he strung the innings together."

Capuano loaded the bases in the seventh with a single, his throwing error and a walk. Javy Guerra came on and walked Maybin on four pitches to make it 4-2.

Capuano (5-1) allowed four runs, three earned, and six hits in 6 1-3 innings, struck out six and walked three. He was trying for the best start to a season in his career. He went 5-0 in 2007 with Milwaukee and then went 0-10 in his final 18 starts. He finished 5-12 after losing two games out of the bullpen.

Richard is 6-1 in 10 career starts against the Dodgers.

Elian Herrera had an RBI double for his first major league hit as the Dodgers took a 2-0 lead just four batters in. After Chris Gwynn's leadoff single, Herrera brought him in with a double that landed just inside third base and rolled all the way into the left-field corner. Herrera advanced on Bobby Abreu's groundout and scored on Andre Ethier's sacrifice fly.

"We're not good enough to come down here and get (five) hits and think we're going to win a game," manager Don Mattingly said. "I don't care what kind of record we've got, what kind of record they've got, you come in here and get (five) hits and don't give yourself a chance to score, you're not going to win."

Herrera was recalled Monday from Triple-A Albuquerque and made his big league debut as a pinch-hitter Tuesday night. He made his first start Wednesday, at second base.

It was Ethier's 27th RBI in his last 24 games against San Diego.

NOTES: Black said LF Carlos Quentin had a cortisone shot in his right knee on Tuesday. Quentin has been out since having arthroscopic surgery during spring training. .... Jimmy Jones, the pitching coach at Double-A San Antonio, is filling in as bullpen coach with the Padres while Darrel Ackerfelds undergoes treatment for pancreatic cancer. He underwent chemotherapy and radiation. ... Richard committed his fourth error, one off the team lead, when he spiked a short throw to first on Gwynn's grounder leading off the third. Gwynn was then caught stealing. ... The two-game series concludes Thursday night when L.A.'s Aaron Harang (2-2, 4.46 ERA) is scheduled to face San Diego's Edinson Volquez (2-2, 2.79). On April 13 at Dodger Stadium, Harang set a Dodgers record with nine consecutive strikeouts, one short of the major league mark, and tied his career high with 13 strikeouts. Harang was with the Padres last year, leading them with 14 victories.