MILWAUKEE - The times that Cole Hamels has taken the field with a lead have been few and far between in the last two seasons.

But on Monday night in Milwaukee, Chase Utley drilled a two-run home run before Hamels trotted out to the mound at Miller Park. He still had an entire start in front of him, but, even psychologically, it couldn't have hurt.

"OK," Hamels thought in the visiting dugout, as Utley rounded the bases. "I have something to work with."

The Phillies offense, with the exception of one mad dash by Utley around the bases, went back into hibernation for the remainder of the night and Hamels entered the late innings of the 15th start of his season with a one-run lead.

It was his game to win or lose. Hamels persevered.

Hamels held Milwaukee's fifth-inning rally to two runs, sent down the middle of the order in the sixth and deftly danced out of another troublesome inning in the seventh as the Phillies eked out a 3-2 win.

"Guys played good baseball from the beginning," Hamels said. "Knowing my job is to go out there, go deep into the ballgame and prevent runs, try to keep the lead. - it's good to be able to do that. It's good to have some runs."

The victory was only the second for the Phillies in their last 11 games. It was Hamels' second win in his last 10 starts, despite his sparkling 2.20 ERA over that 6-1/2-week period.

Of course, the Phillies offense has scored three runs or fewer in seven of those 10 Hamels' starts.

The Phillies' inability to score more than two or three runs on a nightly basis has become the team's biggest problem. Even general manager Ruben Amaro Jr. acknowledged it before the game, saying changes to the personnel of the lineup were probable soon.

Utley, who had a rare day of rest out of the lineup on Sunday, attempted to change the trend on Monday. Named to his sixth All-Star team a night earlier, Utley went 2-for-3 with a home run, a walk and two runs scored.

"His swing looked real crisp, strong; he had a lot of energy, a quick bat," manager Ryne Sandberg said. "I think that was all about the one day off. A good bounce-back game after a blow. It showed."

After handing Hamels a two-run lead with his seventh home run or the season, before the pitcher took the mound, Utley worked to up that lead in his next at-bat, when he knocked a two-out single off Brewers starter Marco Estrada. When Ryan Howard followed with a hit toward the gap in right-center, Utley motored all the way from first to home to increase the lead to 3-0.

Not-so-fun fact: The Phillies entered Milwaukee having lost 27 of their last 28 games when they've scored three runs or fewer, and 14 straight. But Hamels - and the rising rookie Ken Giles - helped end that run of infamy.

After Milwaukee began the fifth with two singles and an error, Hamels gave up a two-run, pinch-hit single to Jeff Bianchi. But then he got back-to-back groundouts from Rickie Weeks and Ryan Braun to escape with the lead intact.

Two innings later, Hamels walked the leadoff batter and gave up a one-out hit two batters later. But he collected two big strikeouts, too: first on Mark Reynolds, after the all-or-nothing slugger launched a foul ball just to the left of the leftfield foul pole; and then, one from pinch-hitter Martin Maldonado, at the end of an eight-pitch at-bat that began 0-2.

Sandberg pulled Hamels at that point, figuring Hamels had just collected a very big, but stressful second out of the inning with the top of the order due up.

"Thirty pitches to get two outs, he labored and battled," Sandberg said. "He did his job."

The first-year manager looked smart when Ken Giles took over and resembled a young, dominating Brad Lidge.

"His biggest moment yet, heart of the order, that situation," Sandberg said. "He was outstanding."

After getting a long, loud out to end the seventh - defensive replacement Tony Gwynn Jr. caught the ball against the wall in dead center - Giles put up a zero in the eighth and made an All-Star outfielder look silly in the process.

With a runner on second and one out, Giles threw four straight sliders on the lower, outer half of the plate to Carlos Gomez. Gomez chased each of the last three, corkscrewing himself out of his batting helmet at one point.

"I knew he was aggressive, a big hacker," Giles said. "I was just going to keep on throwing sliders."

"Very impressive," Hamels said of his teammate. "Anytime you know he's coming into the ballgame you can sit back and watch and know you're in good hands. He's got amazing stuff. You can tell with his presence, he really wants to get the job done and he's confident with what he's got."

Summoned to the big leagues last month, Giles has allowed one earned run in his first 11 major league appearances. He has struck out 17 of the 40 batters he's faced in 11 2/3 innings.

"I don't think it's been that easy," Giles said. "I just prepare every game, study the hitters and know what I need to work on before the games and from there on, carry on what I've been doing."

Both Giles and Hamels also benefited from poor baserunning from the Brewers, the team with the best record in the National League.

After Ryan Braun, nursing a bad back, led off the eighth with a double off Giles, pinch-runner Logan Schafer inexplicably tried to advance from second to third when Jonathan Lucroy followed with a routine ground ball to short. He was out, easily.

Jean Segura made a similarly poor decision on the base paths in the fifth, when Bianchi ended Hamels' shutout run. He attempted to go from first to third on Bianchi's single, and Marlon Byrd's perfect throw to the bag had him out by three feet.

A hat trick of miscues on the basepaths began in the second inning, when Gomez led off with a double only to be picked off by the tandem of Hamels and Utley.