PHILADELPHIA (AP) " The New York Mets clinched a postseason spot with a 5-3 win over the Phillies to secure the top National League wild card and set off a bubbly celebration that spilled from the visitors' clubhouse onto the field in Philadelphia.
The defending NL champions will host San Francisco or St. Louis on Wednesday night, with the winner advancing to face the Chicago Cubs.
The only other time the Mets made the postseason in consecutive years was 1999-2000. New York won the NL East last season and went all the way to the World Series before losing to Kansas City.
Two games under .500 on Aug. 19, the Mets have gone a major league-best 27-12 during the last six weeks to vault over four teams in the NL wild-card race.
By clinching with one day to spare in the regular season, manager Terry Collins and the Mets can save All-Star Noah Syndergaard for the wild-card game.
San Francisco stayed one game ahead of St. Louis with a 3-0 win over the Dodgers, and so holds a one-game lead for the last NL playoff spot going into the final day of the regular season. Matt Moore starts at home for the Giants against the Dodgers, where a win gives them the second NL wild-card slot.
After a 4-3 win Saturday, the Cardinals need to beat Pittsburgh for the second day running and hope for a Giants loss to force a one-game tiebreaker.
Three teams are vying for an AL wild-card berth, with Baltimore, Toronto and Detroit all in contention going into the last day.
In Boston, Ezequiel Carrera hit a ninth-inning sacrifice fly to help Toronto to a 4-3 win after the Red Sox tied it in the eighth on a balk.
The win moved the Blue Jays into a tie with Baltimore for the top spot in the AL wild-card race with 88 wins with one game to play " Toronto owns the tie-breaker.
With the loss, Boston fell one-half game behind Cleveland " which beat the Kansas City Royals 6-3 " in the race for home-field advantage when their ALDS series begins on Thursday.
The Orioles lost 7-3 to the Yankees, with Tyler Austin equaling the score with a seventh-inning home run and Austin Romine and Brett Gardner driving in two runs each in the eighth as New York rallied from a three-run deficit to stall Baltimore's playoff push.
Last-place Atlanta damaged Detroit's playoff hopes with a 5-3 win. Freddie Freeman and Nick Markakis homered, rookie Aaron Blair had a career-high 10 strikeouts and The Tigers dropped 1 1/2 games out of the second AL wild-card spot. They need a win Sunday and a loss by Baltimore or Toronto to avoid postseason elimination.
The Tigers will have ace Justin Verlander on the mound Sunday. Depending on the playoff scenario, Detroit's regular season might extend with a makeup home game Monday against Cleveland.
Seattle's playoff hopes ended in a 9-8 loss to Oakland, with Joey Wendle hitting a tiebreaking RBI double off Edwin Diaz in the top of the 10th inning.
At Arlington, Texas, Colby Lewis lost his fifth straight start in the right-hander's tuneup for the playoffs, allowing Corey Dickerson's three-run homer in Tampa Bay's 4-1 victory.
The Rangers rested most of their starters a night after the AL West winners clinched home-field advantage throughout the playoffs. Texas (95-66) remains a win shy of the franchise record.
Washington beat Miami 2-1 while clinching home-field advantage in the NL Division Series.
NL East champion Washington's third trip to the postseason in five years will begin Friday in the nation's capital against the NL West champion Los Angeles Dodgers.
The Dodgers' loss to San Francisco assured Washington a better record and was announced before the bottom of the seventh to the Nationals Park crowd of 31,635, which responded with a standing ovation.
The Cincinnati Reds had a 7-4 win over Chicago, pulling away to a victory over what's likely to be the Cubs' lineup for the first game of the playoffs.
Jon Lester (19-5) gave up five runs in five innings, including Eugenio Suarez's two-run homer and a pair of RBIs by Joey Votto. The left-hander hadn't allowed five runs in a start since July 9.
Cubs manager Joe Maddon has been getting players " especially his starting pitchers " some rest heading into the postseason. Even so, the Cubs have won eight of 12, finishing one of their best regular seasons with a flourish. Chicago's 102 victories are its most since 1910.
This story has been automatically published from the Associated Press wire which uses US spellings