MILWAUKEE -- The Milwaukee Brewers are back where they started in the race with Arizona for homefield advantage in the first round of the playoffs.
Alex Presley homered to lead off the game and drove in the go-ahead run in the seventh inning, lifting the Pittsburgh Pirates to a 9-8 victory over the Brewers on Monday night.
But NL Central champion Milwaukee remained one game ahead of NL West champion Arizona, which lost 4-2 to Los Angeles. The Diamondbacks hold the tiebreaker by winning the season series 4-3.
"We're still obviously in a good position where we control our own destiny, so if we take care of business and win the next two days, it doesn't matter what they do," Brewers outfielder Ryan Braun said. "It's really important for us to try and win games and get homefield advantage. My off day turned into two hours of playing baseball, but it was well worth it despite the disappointing finish."
|More on Pirates at Brewers|
Braun went 1 for 1 at the plate and is seeking the NL batting title in a tight race with Mets shortstop Jose Reyes. Braun (.33393) doubled and was hit by a pitch after entering as a pinch-hitter in the sixth. Reyes (.33396) went 3 for 4 against Cincinnati.
"I've never denied I was looking at it," Braun joked. "I just know he ended up at .334 and I'm at .334. Just like everything else, it seems like it comes down to the last day. That's how it should be. Makes it fun."
Not much else about this game was fun, taking 4 hours, 13 minutes to complete and resembling more of the plodding postseason pace the Brewers will soon face.
"I didn't feel the rhythm because there wasn't any rhythm. It was slow," Brewers manager Ron Roenicke said. "That's not the way to play games."
Presley finished 3 for 5 with three RBI and closer Joel Hanrahan held on for his 40th save to help Pittsburgh snap a 12-game skid in Milwaukee and give Pittsburgh its fourth win in 40 tries over the last five years at Miller Park.
"It's been a long time for some people. Honestly, it's been the entire year for myself for the first time to come in here," Pirates manager Clint Hurdle said. "The long journey starts with the first step. So, we took a first step tonight."
Milwaukee (94-66) is the best home team in the majors at 55-24, but it failed in its first chance to tie the franchise's all-time mark for wins at 95.
Presley's two-out double off Takashi Saito (4-2) gave Pittsburgh a 9-8 lead in the seventh and the Pirates' shaky bullpen managed to hold on when Jason Grilli loaded the bases with one out in the eighth and Hanrahan allowed the tying run to reach third with no outs in the ninth.
Craig Counsell led off the ninth with a single and Hanrahan threw two wild pitches that moved pinch-runner Carlos Gomez to third.
But Hanrahan struck out Corey Hart and pinch-hitter Casey McGehee grounded hard to second baseman Neil Walker, who threw out Gomez at the plate. Pinch-hitter George Kottaras grounded out to end it.
"Joel found a way to get it done," Hurdle said. "It wasn't textbook by any means."
Trailing 8-5, Milwaukee rallied off four relievers with two outs in the sixth with run-scoring hits by Prince Fielder and pinch-hitter Braun before Chris Leroux walked in a run that tied it.
Reliever Daniel McCutchen (5-3) ended the inning when shortstop Chase D'Arnaud made a leaping catch of Jonathan Lucroy's liner.
"You end the inning with a screaming line drive at the shortstop with the bases full in a tie score," Hurdle said. "It was good that ball was hot at somebody."
Pedro Alvarez drove in three runs for Pittsburgh, which was tied for the NL Central lead on July 25 with Milwaukee in third place. The next day, the Brewers began a streak of 27 wins in 32 games to take control of the race. They clinched their first division title in 29 years on Friday night.
The Pirates fell under .500 with a 1-12 stretch and has long since guaranteed a 19th straight losing season.
Presley hit the first leadoff homer of his career for the Pirates, the second straight day the Brewers have given up a home run to the first batter, and the Pirates went on to build a 7-3 lead off Brewers starter Shaun Marcum.
But Pittsburgh starter Charlie Morton wasn't much better, allowing a two-run double to Yuniesky Betancourt in the fifth and leaving after the inning leading 7-5.
Walker's RBI single off reliever Frankie De La Cruz in the sixth gave Pittsburgh an 8-5 lead, but it took the Pirates bullpen two outs to squander it.
"It was an exciting game. It was back and forth. The crowd was in it. It was good atmosphere. They're playing for something," Presley said. "It was awesome to battle out with them for nine innings."
The Brewers scratched RHP Yovani Gallardo from Wednesday's start to line him up for the postseason, where he's expected to start Game 1 of the NLDS. ... Pirates CF Andrew McCutchen was scratched about 10 minutes before the start of the game after he was hit by a line drive in the lower abdomen during batting practice. Presley moved from left field to center and Xavier Paul entered the lineup in left. ... Pirates RHP Ross Ohlendorf (1-3, 8.29 ERA) faces Brewers LHP Randy Wolf (13-10, 3.61) in the second of the three-game series.