Updated

Ryan Ludwick may have finally found his stroke with the Padres.

Ludwick, mired in a 2 for 23 slump to start the season, hit a go-ahead homer to back Aaron Harang's six solid innings and San Diego beat the Los Angeles Dodgers 7-2 on Sunday.

Ludwick, who is being counted on to swing a big bat in the middle of San Diego's lineup, connected for his first home run of season that put the Padres ahead to stay at 2-1.

The fourth-inning shot leading off against John Ely (0-1) went an estimated 438 feet into the left-field seats.

"The one Ludwick hit is out of any park in America," San Diego manager Bud Black said. "That ball was crushed."

Nick Hundley added a two-run shot and Cameron Maybin hit a solo home run and had an RBI triple as the Padres avoided a three-game sweep.

Ludwick struggled last year when he hit just .211 with the Padres after being acquired from St. Louis at the July 31 trade deadline in a three-team deal.

"Ryan is going to be fine," Hundley said. "You don't do what he's done in his career without knowing what you are doing out there. I think at times, he puts a lot of pressure on himself because he cares."

Black agreed Ludwick might have been pressing, but said he isn't worried.

"He knows his place on this team and what his presence means to our team," Black said. "He takes it hard when he is not playing well. But he had some good swings today, a couple of good at-bats. Hopefully, it is the start of something big for him."

Harang (2-0) turned in his second solid performance, allowing two runs — one earned — on three hits. The first run he allowed came without the benefit of a hit while the second scored on Harang's throwing error.

Harang and three relievers combined on a three-hitter.

"They are an aggressive team," Harang said. "They come out swinging, especially early in the count. If you go out and establish that you are going to get ahead early, they are going to swing at your pitches."

Hundley, who has hit safely in all seven games he's played this season, took Ely deep into the Padres' center field bullpen in the sixth right after Ludwick drew a two-out walk.

Ely, who was recalled from Triple-A Albuquerque before the game, nearly matched Harang for the first five innings. Ely, who struck out five and walked three, struck out the first two batters in the sixth before he walked Ludwick and Hundley hit a first-pitch fastball for his second home run.

"I think I settled in after the second inning and the home run to Ludwick," Ely said. "Obviously, in the sixth, after getting two quick outs, you want to shut them down and put up a zero."

Tony Gwynn Jr., who had a big day against his former team on Saturday when the Dodgers won twice, led off the game with a walk, stole second and scored on Andre Ethier's ground out.

The Padres tied the score 1-all in the third as Jorge Cantu's RBI single scored Orlando Hudson, who reached on a double.

NOTES: San Diego is planning to activate RHP Mat Latos from the 15-day disabled list (strained right shoulder) so he can make his first start of the season. LHP Wade LeBlanc, recalled from Triple-A Tucson on Sunday, is scheduled to be optioned back. ... Dodgers SS Rafael Furcal took the day off with a sore left wrist, but was available to bunt as a pinch hitter or as a defensive replacement. ... Padres manager Bud Black confirmed that LHP Clayton Richard, who pitched just one inning Friday night before a rain delay of 1 hour, 34 minutes, will pitch Tuesday against Cincinnati. Tim Stauffer, who had been penciled in for Tuesday, will be the starter Wednesday afternoon against the Reds. ... San Diego reinstated utility man Eric Patterson from the 15-day disabled list. ... The Dodgers originally were going to send down reserve C A.J. Ellis to Triple-A Albuquerque but changed course when they found out that C Hector Jimenez had inflammation in his right knee, forcing them to place Jimenez on the DL.