AMERICAN LEAGUE

Yankees 3, Orioles 2 (11)

The Yankees are back in the postseason, though not the way they wanted.

Aaron Hicks doubled home the winning run in the 11th inning, and host New York clinched an AL wild card with a win over visiting Baltimore on Saturday.

Rookie manager Aaron Boone will lead the Yankees into the winner-take-all Oct. 3 wild-card game, most likely against Oakland. The Yankees began the day 1½ games ahead of the Athletics for home-field advantage and are 53-27 at home this season.

Hicks and Luke Voit homered in the second inning, but the Orioles tied the score with runs in the third and the fifth off Lance Lynn.

The Yankees finally broke through after Didi Gregorius singled off Paul Fry (0-1) starting the 11th.

Giancarlo Stanton struck out. Hicks fouled a pitch off his left foot, then took a ball. He lined a low, inside slider down the left-field line, and Gregorius sped home, sliding in headfirst ahead of shortstop Jonathan Villar’s relay throw. Gregorius spread his arms wide, and the Yankees poured out of the dugout to celebrate.

Tigers 5, Royals 4

Mikie Mahtook hit a two-run homer in the eighth inning, and host Detroit beat Kansas City in Victor Martinez’s final major-league game.

With the score tied at 3, Niko Goodrum led off the eighth with his third hit of the game, a single off Jason Hammel (3-14). Mahtook then lined Hammel’s 1-0 slider over the left-field fence for his ninth homer.

Martinez, 39, who made his debut with the Indians in 2002, hit an infield single in his first at-bat and was immediately removed for pinch-runner Ronny Rodriguez. Fellow Venezuelans Salvador Perez and Alcides Escobar came out of the Royals’ dugout to embrace the five-time All-Star as he walked off the field to a standing ovation.

Blue Jays 5, Rays 2

Rookie left-hander Thomas Pannone pitched 6²⁄³ innings to win his third straight start, Rowdy Tellez homered and drove in three and host Toronto beat Tampa Bay, dealing another blow to the Rays’ faint playoff hopes.

Tellez singled in the second, hit a two-run homer in the fourth, and added an insurance run with an RBI double in the eighth.

Tommy Pham and Jesus Sucre hit solo home runs for the Rays, who began the day 6½ games behind Oakland in the race for the second AL wild card. Tampa Bay has eight games remaining.

Toronto has won two of the first three of this four-game set. The Blue Jays are 5-10 against the Rays this season.

Making his fifth major-league start, Pannone (4-1) allowed two runs and six hits. He walked three and struck out five.

NATIONAL LEAGUE

Braves 5, Phillies 3

Mike Foltynewicz took a no-hitter into the seventh inning as host Atlanta beat Philadelphia to clinch its first National League East crown since 2013.

A year after going 70-92, manager Brian Snitker and his Baby Braves surged back into the playoffs. A loud crowd at SunTrust Park joined the party when rookie Ronald Acuna Jr. caught a flyball for the final out, setting off a big celebration on the field.

Atlanta won its fourth straight game and beat second-place Philadelphia for the third day in a row.

Foltynewicz (12-10) tipped his cap to a standing ovation as he left with runners on first and second in the eighth with a 4-0 lead.

Jesse Biddle relieved, walked the first batter he faced and gave up two runs on Cesar Hernadez’s bases-loaded single. Brad Brach allowed Rhys Hoskins’ RBI single before Jonny Venters escaped the jam on a lineout and a grounder.

Cardinals 5, Giants (10)

Tyler O’Neill hit a solo homer with two outs in the 10th inning and host St. Louis held its playoff position, rallying past San Francisco.

Yadier Molina also homered for St. Louis, which began the day 1½ games ahead of Colorado for the second NL wild-card spot. The Cardinals, who have seven games remaining, started three games behind Milwaukee for the top wild-card slot.

St. Louis won for the fifth time in six games. San Francisco has lost three in a row.

O’Neill hit his ninth homer, connecting off Mark Melancon (0-3) to give the Cardinals their 11th walk-off win of the season.

Nationals 6, Mets 0

Rookie Austin Voth and four relievers combined on a one-hitter and host Washington defeated New York hours after the Nationals were officially eliminated from playoff contention.

Matt Wieters and Trea Turner homered for Washington.

Voth (1-1), making his second major-league start, allowed only an infield single to Michael Conforto leading off the fourth inning. Voth struck out five with two walks in five innings.

Turner’s 18th homer of the season, a two-run shot, put Washington ahead in the third, and Wieters added a three-run homer off reliever Jerry Blevins in the sixth.

New York’s Corey Oswalt (3-3) allowed two runs over five innings.

Marlins 5, Reds 1

Austin Dean homered and drove in three runs, and five Miami pitchers combined on a six-hitter to beat visiting Cincinnati.

Dean singled home a run in the fourth inning and hit his fourth homer in the sixth, raising the rookie’s average to .219 in 96 at-bats.

Jose Urena (8-12) pitched 5⅔ scoreless innings to win his fourth start in a row. He was visited by a trainer with two out in the sixth and then gave up consecutive singles and departed. The Marlins made no announcement during the game regarding any injury.

Drew Steckenrider came on to get the final out and strand two runners for his fifth save.