MILWAUKEE -- For the New York Mets, a playoff spot was certainly worth celebrating. Even if they still have bigger goals on the table in the middle of a heated pennant race.
Reinstated from the injured list before the game, Scherzer (10-4) struck out nine in six innings. The 38-year-old ace threw only 68 pitches, but that was as far as the NL East leaders let him go in his first start in 16 days.
Brewers star Christian Yelich doubled leading off the seventh against Tylor Megill, making his first major league relief appearance after 27 starts. Megill also came off the injured list earlier in the day.
Pete Alonso hit a three-run homer off reigning NL Cy Young Award winner Corbin Burnes (10-8), and the Mets won their fifth straight to wrap up at least one of the three National League wild cards. They lead their division by one game over defending World Series champion Atlanta, which beat Washington 5-2 at home.
"This is what you play the game for," said Scherzer (200-101), who joined Justin Verlander (243 wins) and Zack Greinke (223) as the only active pitchers with 200 career wins. "You play to get into the postseason. There's a lot of ways for it not to work out. For us to be able to find a way to get into the postseason, that's awesome. That's what we celebrate. That's what you play the game for.
"We have a lot of things in front of us. We understand that. But you got to celebrate the good times, too."
Mets players and coaches hugged and high-fived on the field after the final out, then enjoyed a boozy but subdued celebration in the clubhouse.
"This is just the first step. I have high expectations," owner Steven Cohen, wearing a Mets cap, said after giving a postgame speech to the team. "If we can win the division, that would be great. Obviously, Atlanta is a great team, and it will probably go down to the wire, and then we'll see what happens in the playoffs. I think this is a team that can go really far."
It is the 10th postseason appearance in the franchise's 61-season history, and first since the Mets lost to San Francisco in the 2016 NL wild-card game.
"We understand this is not the end goal, but it's part of our destiny," shortstop Francisco Lindor said.
Mets players took a group photo and selfies on the field after the game. In the clubhouse, Scherzer held a bottle of Ace of Spades champagne while drinking out of a paper cup.
"It's a mature group that revels, stays in the moment," first-year Mets manager Buck Showalter said.
Scherzer was activated Monday after recovering from left oblique irritation. Showalter said before the game "we're not going to go too deep with Max physically" in his first big league start since Sept. 3.
"We understand this is not the end goal, but it's part of our destiny." Mets SS Francisco Lindor
Scherzer sprinted to the mound before each inning. He often had the ball in hand before most of his teammates emerged from the dugout.
A smiling Scherzer received a hearty round of high-fives from teammates when he returned to the dugout after the sixth, indicating he was done for the night.
"Our chemistry is unparalleled," said Alonso, headed to the playoffs for the first time in his career.
Scherzer exited his previous start with fatigue on his left side and went on the IL with oblique irritation. He also went on the injured list with a left oblique strain in May and was activated July 5.
"He didn't give us many pitches to hit," Brewers manager Craig Counsell said. "Lots of strikes, got ahead of us. We didn't do anything against him."
It was Scherzer's fourth perfect game bid through six innings, tied for the most in the expansion era (since 1961).
There have now been 3,687 days without a perfect game in the majors, the longest span since a 13-year drought from 1968 to '81 (4,755 days). Félix Hernández was the last to throw one, on Aug. 15, 2012.
The loss dropped Milwaukee 8½ games behind first-place St. Louis in the NL Central and 2½ games back of Philadelphia for the third NL wild card. The Brewers had won two of three games against the Yankees in Milwaukee over the weekend.
With one out in the fourth, Burnes gave up consecutive singles before Alonso hit a 1-2 changeup 437 feet for his 36th home run to stake New York to a 3-0 lead.
Alonso's 118 RBIs lead the NL.
The previous Mets players to hit consecutive triples were Jose Reyes and Jason Bay in April 2010.
Rowdy Tellez hit a two-run homer off Megill in the seventh, his 32nd.
It was the Mets' first win in Milwaukee since May 2018. They had lost their past nine road games against the Brewers, and 14 of the past 15.
"A lot of blood, sweat and tears poured into this. Many years of hard work to try and get to this point," Nimmo said about reaching the playoffs. "It's been a little bit of a drought. ... We're excited to celebrate it and enjoy this."
Information from ESPN Stats & Information and The Associated Press was used in this report.