MILWAUKEE -- J.J. Hardy hasn't had many hits this season. Now he has one to remember.
The rookie shortstop delivered a pinch-hit single with two outs in the bottom of the ninth inning, scoring Junior Spivey with the winning run as the Milwaukee Brewers ended the New York Mets' four-game winning streak with a 5-4 victory Sunday.
Hardy was batting .147 before his first pinch hit in his second try this season.
"I guess I was the last one on the bench," Hardy said after Milwaukee's fourth walk-off win in nine games. "I have been through some tough times lately. It feels pretty good.
"I was sitting on a fastball, got it and found a hole."
Spivey, who had his fourth three-hit game of the season, singled with one out in the ninth. He then stole second base, barely beating catcher Mike Piazza's throw off a pitchout.
Milwaukee entered the game with just seven stolen bases in 16 attempts.
"He tagged my foot and then the base," Mets second baseman Miguel Cairo said of Spivey's steal. "Before he tagged my foot, I tagged him."
After Chad Moeller struck out, Hardy hit a 1-0 pitch off Mike DeJean (0-1) past the dive of third baseman David Wright and into left field. Spivey scored, easily beating the off-line throw by Cliff Floyd.
"I faced DeJean (Saturday) and he pounded me with sinkers," Hardy said. "I had a plan."
"That was probably the best sinker I've thrown all year, and to have it play out the way it did is really disappointing," DeJean said.
Jeff Cirillo and Geoff Jenkins also had three hits for Milwaukee, which outhit New York 17-5. The Brewers were 4-for-16 with runners in scoring position.
"There was some opportunities (to score more runs)," Brewers manager Ned Yost said. "We didn't make anything happen."
Milwaukee scored its first four runs in the opening two innings against struggling Mets pitcher Tom Glavine. The left-hander made it through six innings but gave up 11 hits, many of the soft variety that found open spots.
"I don't know that I have given up that many bloopers and broken bats and whatever else in one game in my career," Glavine said, "but that's kind of the way things go when things aren't going your way personally."
Glavine also walked two, raising his season total to 24 in 36 2-3 innings. In his last three starts, Glavine has allowed 18 earned runs. But his effort Sunday actually lowered his ERA to 6.87.
"You just have to keep battling through it," he said. "I feel good about the way I threw the ball and I feel good about the adjustments I tried to make."
Cirillo hadn't had three hits in a game since June 10, 2003, at Montreal. He entered with a .180 average this season, but has hit .318 in his career against the Mets.
Bill Hall snapped an 0-for-12 slump with an RBI double in the first inning that gave Milwaukee its first run. Cirillo's run-scoring double in the first made it 2-1.
Milwaukee added two more runs in the second as Jenkins' bloop double and Carlos Lee's single each scored a run. Jenkins, who last had three hits on Sept. 29, 2004, against Arizona, ended an 0-for-9 slump.
With the Mets trailing 4-1 in the sixth, Mike Cameron hit his second home run of the season -- off an 0-2 pitch from starter Chris Capuano -- to draw New York within one run.
The Mets tied it in the eighth when Carlos Beltran, who recorded his fifth three-hit game of the season, scored on a fielder's choice by David Wright.
"We've been playing that way all year," Mets manager Willie Randolph said. "We've been battling back."
Milwaukee fell behind 1-0 in the first when Beltran, who hit two home runs Saturday, delivered a run-scoring single.
Derrick Turnbow (4-1) pitched the ninth to earn the win. Capuano gave up three runs, four hits and four walks in seven innings.
"He was effectively wild," Yost said. "He got us through seven innings with the lead."
- Milwaukee 1B Lyle Overbay left the game after two innings with a strained right hamstring. "It stiffened up on him," Yost said. "It's like a cramp. He was OK. He didn't want to come out." Overbay was replaced by Wes Helms.
- Milwaukee is 2-9 against teams with winning records and 13-6 against teams with .500 or losing records.
- The Mets, who lead the National League with 40 home runs, hit nine in the three-game series. Milwaukee hit three.
- Brewers 2B Junior Spivey returned to the lineup one day after attending his grandmother's funeral.