SAN DIEGO -- The Padres plated enough runs to get them a 5-3 win over the Astros on Sunday afternoon. But those runs just played a supporting role to how this game came together.

The Padres got contributions from almost everyone in their lineup, but the afternoon belonged to 41-year-old starting pitcher Greg Maddux. The veteran picked up career win No. 342 in front of 37,628. Maddux (9-9) now is tied with Tim Keefe for ninth on the all-time wins list.

"Greg's been pitching very well the last number of starts," Padres manager Bud Black said. "This was just indicative of what he's been doing lately. The best fielding pitcher I've ever seen by far. [His] anticipation on the mound is off the charts."

Maddux's only flaw to a perfect day was a home run Lance Berkman hit over the left-field wall in the first inning. The homer wasn't a total surprise, since Berkman blasted two in the series opener on Friday. Maddux ended his outing by allowing one run on two hits over six innings.

He struck out three and walked none to continue his streak of going 28 innings without issuing a walk. Maddux started this streak on July 28 against the Astros at Minute Maid Park.

Houston's 1-0 lead disappeared in the bottom of the fourth inning. Adrian Gonzalez led off with a single, and Khalil Greene doubled to center field to move Gonzalez to third. With two on and no outs, Rob Mackowiak grounded out to drive Gonzalez home. Terrmel Sledge followed with a sacrifice fly that scored Greene.

"I was happy I was able to get things going [with] that first run," Gonzalez said. "Khalil backed me up with a double. Mack hit a great ball and got me in, and Terrmel finished it off. It was good to take a lead for Maddux, from the way he was pitching."

Gonzalez then hit a home run to the first deck of the right-field stands in the sixth inning. It was his 20th homer of the year, making him the 12th Padre to have multiple 20-plus-homer seasons. He also did it last year, when he blasted 24.

The Padres (66-57) continued their sixth-inning rally with two more runs. Sledge drew a walk from Astros starter Matt Albers. Kevin Kouzmanoff was hit by an Albers pitch, and then Josh Bard walked to load the bases. Pinch-hitter Mike Cameron continued the bases on balls trend by walking to force Sledge home. Brian Giles capped the inning with an RBI single.

Giles finished the afternoon by going 3-for-4. It was his fourth multihit game in a row.

Maddux went 2-for-2, collecting his 40th multihit contest of his 22-year Major League career.

Maddux did a little bit of everything, showing his skills on the mound, at the plate and in the field.

"He's always a guy that has been known to have a good bat as well," Gonzalez said. "He had a couple good hits for us today."

The most valiant effort Maddux made, besides his stellar performance on the mound, was what he did in the third inning. The veteran singled to center field. Then Giles hit a single, which sent Maddux running feverishly toward third, where he slid and jammed his right foot on the bag. The awkward slide didn't look pretty.

Black came out to check in with Maddux, who stayed on base. But it was a close call for the Padres, who are in the process of getting some injured players back into their lineup. One of those players is Milton Bradley, who is working his way back from a right hamstring strain he suffered on Aug. 11. Bradley was retired in a pinch-hit appearance on Sunday.

"When he slid, that didn't look pretty nice," Gonzalez said.

Added Black: "Your heart drops a little bit, [but] he assured us he was fine."

The Mad Dog explained the situation best.

"I didn't stop when I started sliding. You expect to slow down a little bit, but I never did. I kind of hit the base," Maddux said. "Maybe I slid low -- that's probably what it was. I got caught trying to read the ball and slid at the same time -- wasn't too clean. I just jammed it a little bit, no big deal."

Albers (3-6), who allowed five runs on seven hits over 5 2/3 innings, was charged with the loss.

The Astros (56-68) knocked in another run in the seventh. Padres closer Trevor Hoffman came in to take care of the Astros in the ninth inning, but it didn't go exactly as planned.

Hoffman allowed one run, and then he had two runners on base, including the potential game-tying run. With two outs, Eric Bruntlett worked a 2-2 count. Hoffman was able to strike him out swinging to record his 31st save of the season.

The Padres were able to salvage one win in this three-game series. Now they get a much-deserved day off before starting a three-game series against the Mets on Tuesday.

San Diego moved within four games of Arizona in the National League West standings.

"It's time to really start thinking about winning games and not just trying to win against anybody, but win against the teams that are contending as well," Gonzalez said. "We gotta go out there and play well."