Updated

John Ely knows he'll have to do better than he did in his first spot start of the season if he's going to earn a longer look in the Dodgers' rotation.

Ely, recalled from Triple-A Albuquerque on Sunday, pitched well through five innings before the San Diego Padres broke open the game on Nick Hundley's two-run homer in the sixth en route to a 7-2 win over Los Angeles.

Ely, 4-10 in 18 starts for the Dodgers last year, was pitching because of a spring training injury to right-hander Jon Garland and because it was the first time Los Angeles needed a fifth starter.

"He threw the ball well and kept us in the game, giving us a chance to get out early and get a run quick," Dodgers manager Don Mattingly said. "We just didn't do anything after that."

The Dodgers were shut down by Aaron Harang, who pitched six sharp innings.

Ely (0-1) allowed a solo homer to the slumping Ryan Ludwick that put San Diego ahead 2-1 in the fourth inning. The righty allowed four runs on six hits in 5 2-3 innings.

"I definitely could have had a better result," Ely said. "I had a little trouble getting into a rhythm in the first couple of innings. And I settled in after that."

Cameron Maybin hit a solo homer off reliever Kenley Jansen and had an RBI triple as the Padres avoided a three-game sweep.

Ludwick was 2 for 23 this year before he connected off Ely leading off the fourth inning.

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.

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 nearly matched Harang for the first five innings. Ely, who struck out five and walked three, fanned the first two batters in the sixth before he walked Ludwick and Hundley hit a first-pitch fastball for his second home run.

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. Ludwick got off to a slow start this season as San Diego has scuffled offensively.

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: Garland allowed three runs on six hits over 4 2-3 innings in rehab start with Class-A Rancho Cucamonga Sunday. If Garland comes out of the start healthy, he may be activated to make his first start on Friday at home against the St. Louis Cardinals. ... 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. ... 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.