The Milwaukee Brewers wrapped up the best field advantage in the 3 victory over the Pittsburgh Pirates.

The NL Central-champion Brewers finished 96-66 to set a club record while edging the Diamondbacks for the No. 2 seed in the National League.

Carlos Gomez hit a three-run homer while Corey Hart and Jonathan Lucroy added solo blasts for the Brewers, who will start Yovani Gallardo in Game 1 of the National League Division Series against NL West champion Arizona.

"Coming into today, our main goal was to win so we can play here. It means a lot to have the second best record in the National League," Gallardo said. "I'm very excited. I can't wait for Saturday."

Zack Greinke (16-6), pitching on three days' rest, threw six quality innings to go undefeated at home in his first season in Milwaukee. He allowed two runs on five hits.

The only disappointing outcome from the Brewers' perspective was Ryan Braun going 0-for-4, which dropped his batting average to .332. Mets shortstop Jose Reyes won the NL batting title at a .337 clip.

"I'm sure he's a little disappointed he didn't win it. I think we all are, but he had a tremendous season," Brewers manager Ron Roenicke said of Braun.

Prince Fielder, who finished one home run shy of Matt Kemp's NL-leading total of 39, was taken out for a defensive replacement in the ninth and given a standing ovation by the Miller Park crowd. Fielder is set to test the free agent market in the offseason and is not expected to re-sign with the Brewers.

Jeff Locke (0-3) allowed three homers and five runs in a four-inning start for Pittsburgh, which was in first place in the Central in mid-July but tripped to a 72-90 record.

"We wanted more, but we got what we got. We got 72 (wins). Numerically it's a step forward, but we have a lot of work to do," Pirates manager Clint Hurdle said.

Lucroy narrowly cleared the left-field wall in the third, and Hart followed three batters later with a longball to right.

The Pirates pushed one across in the fourth when Derrek Lee doubled and scored on Jason Jaramillo's two-out single, but Gomez extended the lead with his three-run blast in the bottom half.

Jerry Hairston Jr. added an RBI single in the fifth off Chris Leroux for a 6-1 cushion.

Fielder's throwing error allowed Neil Walker to score in the sixth, but the Pirates gave the run back in the next half-inning as Lucroy raced home on Hart's sacrifice fly.

Walker scored on another error in the eighth, this time by Yuniesky Betancourt, but the Brewers hung on and have two days off before starting their second postseason series since 1982.

Game Notes

Greinke went 11-0 in 15 starts at Miller Park. He struck out four and eclipsed the 200-strikeout plateau for the second time in his career and matched his career-high win total...The Brewers also set a franchise mark for home wins (67), while the Pirates went 36-45 on the road...Since the start of the 2007 season, Pittsburgh has posted a 4-38 record at Miller Park.