Hamels (5-1) was suspended by major league baseball after the Phillies left-hander intentionally threw a pitch that hit Washington rookie Bryce Harper a week ago.
It was Hamel's fifth victory in his last six starts - all Philadelphia wins. The San Diego native allowed five hits while striking out five.
The Padres' lone run against Hamels came in the third. Chris Denorfia hit a one-out double and Yonder Alonso walked. With Jesus Guzman batting, both runners caught Hamels unaware and pulled off a double steal. Guzman's slow grounder to third plated Denorfia to make it 2-1. Hamels then got Nick Hundley to ground out to short.
San Diego threatened in the eighth but managed to score only one run. Jose Contreras relieved Hamels and struck out Alonso but gave up a double to Guzman, who then stole third. Contreras got Hundley to ground out to short but quickly gave up a run-scoring single to James Darnell that pulled the Padres to 3-2.
Antonio Bastardo replaced Contreras and got Andy Parrino to hit a soft blooper behind the mound that shortstop Jimmy Rollins caught just off the ground.
Jonathan Papelbon worked a perfect ninth - striking out two of the three batters he faced - for his 10th save.
Rollins opened the game with his first homer this season off Padres starter Jeff Suppan (2-1), who gave up three runs - two earned - on six hits over six innings. It was the 38th leadoff home run for Rollins in his career.
The Phillies were able to get some hits with runners in scoring position after going 1 for 10 in Friday night's 2-1 loss.
Ty Wigginton hit a hard grounder to third but Darnell's throw sailed over the head of Alonso at first, allowing Wigginton to take second. With two outs, Brian Schneider, who came in hitting 9 for 18 lifetime against Suppan, singled to center to drive in Wigginton and make it 2-0.
Juan Pierre's two-out double in the bottom of the fifth scored Schneider for a 3-1 lead.
Suppan was making just his third start of season after being recalled from Triple-A Tuscon on May 2. The 37-year-old was signed to minor league deal during the offseason and spent last year with Kansas City's Triple-A affiliate in Omaha.
Suppan has lost each of his last seven decisions against the Phillies dating to April 9, 2005. He is 0-7 in his last nine starts with his teams losing all nine. The last time he beat the Phillies was May 6, 2004 while he was with St. Louis.
Notes: Suppan made his 415th career start and ranks fourth among active pitchers. Jamie Moyer leads with 635. Livan Hernandez (474) and former Phillies pitcher Kevin Millwood (421) follow. ... Rollins came in just 9 for 27 with two home runs in his career against Suppan. ... Announced attendance was 45,442 for the Phillies' 220th consecutive regular season sellout. ... Hunter Pence went 0 for 4 and is now mire in a 2-for-23 slump. ... Pierre went 2 for 4 and has seven hits in his last 16 at-bats.