PHILADELPHIA -- When Roy Halladay isn't perfect, or close to it, he is often working his way in and out of trouble, bearing down with runners in scoring position and grinding his way through moments of tension. Halladay, the Cy Young winner and Phillies ace, isn't always unhittable.

But while he bends, it is difficult to make him break, something the Padres discovered on Friday. They managed 10 hits off Halladay and seemed constantly to be filling the basepaths with runners, but scored just two runs in a 3-2 loss to Philadelphia in front of 45,080 at Citizens Bank Park.

Halladay, who was making his first start since throwing a perfect game on Saturday against Florida, barely bested San Diego's Mat Latos, who lost for the first time since May 1.

"We played them hard, they played us hard back," Padres manager Bud Black said. "It was a well-fought game on both ends."

On a hot, muggy night in a hitter's haven, neither offense generated much firepower. Only one hit left the yard.

That was a third-inning home run by Phillies outfielder Shane Victorino -- the second home run the struggling Phillies have hit in the past 84 innings -- off Latos, who gave up four hits and three runs in five innings.

"Mat competed, I liked that," Black said. "The Phillies are a good lineup and they made him work. It's a game that you win sometimes and tonight he didn't."

Latos allowed more than two runs for the first time since April 26, snapping a stellar stretch for the 22-year-old right-hander that included wins in four of his past six outings. But afterward, he wasn't pleased with his performance, particularly the four walks.

"Today it just didn't seem like I was going at my gameplan," Latos said. "It seemed like I was just a thrower not a pitcher, I guess."

It was a walk that did the damage. Philadelphia's go-ahead run scored on a bases-loaded walk in the fifth inning by Jayson Werth, who took a 97 mph fastball inside from Latos that barely missed the corner.

"I thought it was a strike," Latos said. "I talked to [home-plate umpire Jim] Wolf after the inning and asked if it was down or if it was in. He said it was a little down. It was the right call."

After achieving perfection six days ago, Halladay was far from it on Friday. He gave up a bloop single to Adrian Gonzalez in the first inning and couldn't seem to stop the feisty Padres from constantly knocking at the door from then on.

San Diego scored on an RBI single by Tony Gwynn Jr. in the second inning, and then added a run on a sacrifice fly by Gonzalez in the fifth. The Padres had runners on base in every inning against Halladay except the fourth, when he struck out the side.

The Padres finished 1-for-13 with runners in scoring position, leaving 11 runners on base.

"It seemed like when he got runners on he locked it in even more," said Gwynn, who went 2-for-3. "We've been good all year capitalizing with runners in scoring position. You've got to tip your hat to him. He made some pitches in tough spots and was able to get out of some jams."

The Padres had their final good opportunity in the eighth inning, after Halladay had exited, loading the bases with one out against left-hander J.C. Romero. Romero was able to get Chris Denorfia to ground into a 5-3 double play to end the threat.

A run there would've gotten Latos off the hook, but Black was still impressed by the way his young starter battled. Latos felt he didn't have his best stuff on Friday; Black liked how he matched his Cy Young counterpart.

"Every game he starts is a learning experience," Black said. "I think today he went up against one of the best guys in all of baseball and matched him. He gave himself a chance to win. He knows that he's learning on the job every start."

For the Padres, it's their second loss in the last six games and it comes at the hands of the beleaguered Phillies, who had lost 11 of 15 coming in. But the Padres know Philadelphia's pedigree well. They were prepared for a fight, and they got one.

"We did a really good job as a team, we battled," Gwynn said. "But we just came up on the short end of the stick."