The San Diego Padres were happy they didn't let another solid outing by a starting pitcher go to waste.

San Diego starter Aaron Harang (3-0) allowed three hits and one run with eight strikeouts in six innings, Chris Denorfia doubled and homered and Ryan Ludwick drove in a pair of runs in the Padres' three-run seventh inning as they beat the Houston Astros 4-2 on Friday night.

The Padres found their offense a day after Dustin Moseley allowed one run in 6 2-3 innings, but took the loss after San Diego was shutout for the third consecutive time with him on the mound.

Denorfia made it 1-0 with a solo homer in the fifth inning, giving the Padres their first run of the series after being shut out Thursday. Houston's Hunter Pence tied it with an RBI double in the sixth inning.

Nick Hundley singled before Denorfia's ground-rule double in the seventh. Ludwick's single to center field drove both players in and gave San Diego a 3-1 lead. Ludwick scored on a sacrifice fly to stretch the lead to 4-1.

"That ball's out of any park in the major league," Padres manager Bud Black said of Denorfia's homer. "That ball was crushed. That lightened up the dugout a little bit and then (Ludwick's) bullet into left center was a big blow."

Luke Gregerson allowed two hits in a scoreless seventh for San Diego and Mike Adams threw a perfect eighth. Closer Heath Bell gave up two hits and a run in the ninth for his third save.

"Good starting pitching, good defense, timely hitting and the guys in our bullpen come in and do the job," Black said. "It happened tonight."

Harang has pitched six innings and allowed one earned run in each of his three starts this season.

"I felt really good today," he said. "I hit my spots and I threw that slider pretty much any count. It felt like pitches were working."

Houston starter J.A. Happ (1-2) yielded seven hits and four runs in seven innings.

"I felt like I was throwing the ball well," Happ said. "I threw a couple balls in there in the seventh. They weren't necessarily bad pitches, but maybe they weren't executed the way I would have liked. It's frustrating."

Houston got two singles in the ninth inning before Carlos Lee scored on a force out by Chris Johnson to make it 4-2. Bell retired pinch-hitter Jason Michaels to end the game.

Denorfia's homer in the fifth inning bounced high on the wall in left field. Jason Bartlett reached on an error by Angel Sanchez with one out. Harang had a sacrifice bunt before Pence caught a flyball from Cameron Maybin for the third out.

Happ gave up a single to Orlando Hudson with one out in the sixth inning, but Houston turned a double play to escape that inning. Hudson extended his hitting streak to 11 games with the hit.

Michael Bourn singled in the first inning before Harang retired the next 10, striking out six. He didn't allow another baserunner until walking Pence with one out in the fourth inning. Pence stole second base with two outs before Harang fanned Brett Wallace to end the inning.

Bourn was the next Astro to get a hit with his single with one out sixth inning. Between Bourn's two singles, Harang retired 16 of 17 batters he faced.

"Aaron made quality pitches throughout the game," Black said of Harang. "He's pitching with aggressiveness and he's pitching with some confidence. It's great to see."

Pence scored Bourn with a line drive to left field that made it 1-all in the sixth inning. Bourn gave Houston its first hit since the first inning with his single with one out in the inning before swiping second base with two outs. It was his sixth stolen base of the season.

NOTES: Hall of Famer Monte Irvin, who played both with and against Jackie Robinson, was in Houston to celebrate Jackie Robinson Day. He, along with several former Astros players met with current players Bourn, Bill Hall and Jason Bourgeois for a reception before the game. Irvin, who is 92, was pleased to take part in the celebration. "He was a wonderful pioneer," Irvin said. "He did a great job of integrating baseball and not only did he make it better in baseball, but he made it better in all the sports." ... Astros SS Clint Barmes, on the disabled list with a broken left hand, said his recovery is going well and will have X-rays on Monday with hopes to begin a rehabilitation stint in the minors soon.