Sonny Gray pitched Oakland into baseball's last playoff spot, Detroit and St. Louis clinched division crowns and Jordan Zimmermann threw a no-hitter in a final-day drama made even more memorable by Derek Jeter's farewell.

Going into Sunday, not a single postseason matchup was certain. David Price and some pals across the majors quickly settled all of them.

Gray shut out Texas 4-0, helping the Athletics hold off Seattle for the second AL wild-card slot. The A's will open this year's postseason at Kansas City on Tuesday night, with Jon Lester facing the Royals' James Shields.

On Wednesday night, Madison Bumgarner and San Francisco visit Edinson Volquez and Pittsburgh in the NL wild-card game.

The best-of-five AL division series puts the wild-card winner at the Los Angeles Angels and the Tigers at Baltimore. In the NL, the wild card plays at Washington and the Cardinals are at the Los Angeles Dodgers.