One day after their 10-game winning streak ended, the NL East-leading Phillies moved 6½ games up on Atlanta and Florida with their 15th win in 17 games.
Hamels (6-5) yielded three runs and four hits, striking out six. The struggling ace won for just the second time in nine starts.
Hamels hasn't pitched like the guy who was MVP of the NLCS and World Series last year, and closer Brad Lidge has been far from perfect with six blown saves. Yet the Phillies are 15 games above .500 at 54-39.
"Just think what happens if they get going," manager Charlie Manuel said. "We can really be a good team."
• Phillies: Romero, Durbin on disabled list
Kyle Blanks hit a two-run homer for San Diego, which has the second-worst record in the majors (37-59).
The Phillies jumped on Padres starter Kevin Correia (6-8) early and didn't let up. Correia surrendered eight runs and nine hits in 3 1/3 innings. It was his shortest outing in 20 starts this season.
"These guys are good," Correia said. "Some teams you can get away with mistakes. They took advantage of mistakes and hit good pitches."
Padres first base-coach Rick Renteria survived a scare in the sixth when he was struck by a hard liner off Adrian Gonzalez's bat. Renteria went down after getting hit in the lower shoulder, but quickly got up and shook it off.
"I feel fine," he said afterward.
The Phillies scored three runs in the second, one in the third and four in the fourth. Werth led off the second with a double and scored on Feliz's single up the middle. With two outs, Jimmy Rollins lined an RBI double and Chase Utley singled him in after Shane Victorino was hit by a pitch.
Werth hit a one-out double in the third and scored when second baseman Oscar Salazar threw wild to first after making a backhanded grab on Feliz's infield single.
Carlos Ruiz hit a solo homer in the seventh for the Phillies, who had 14 hits.
Hamels got in trouble with two outs in the fourth. Chase Headley's RBI double scored Gonzalez, who walked. Blanks followed with a shot over the left-field wall that cut it to 4-3.
The Phillies have averaged 9.5 runs per game in Hamels' six wins and they've scored a total of seven runs in his five losses.
"I try to go out there and put up good, quality starts," Hamels said. "If I keep trying, I will be able to work it out. It's been a helpful lesson. It's been a realization that the game isn't easy."
- The teams were rained out April 20. The Padres came here on an off day before starting a weekend series at Washington.
- The Phillies placed relievers J.C. Romero and Chad Durbin on the disabled list before the game.
- Gonzalez has played in 303 consecutive games, three shy of breaking Steve Garvey's club record.
- The Phillies had their 41st sellout in 49 home games.