Sonny Gray pitched Oakland into baseball’s last playoff spot, shutting out King Felix this October.

David Price delivered the AL Central crown to Detroit, and St. Louis scratched ace Adam Wainwright after wrapping up the NL Central.

And on a final day that featured Derek Jeter’s farewell, Jordan Zimmermann injected even more drama by throwing a no-hitter preserved when Washington rookie Steven Souza Jr. made a catch for the ages.

“Just an epic day for an epic season,” Nationals outfielder Denard Span said.

Going into Sunday’s first pitch, not a single postseason matchup was set — plus the possibility of three tiebreakers loomed. Hours later, the brackets were all settled in Game 162.

Gray blanked Texas 4-0, helping the shaky Athletics hold off Felix Hernandez and the Seattle Mariners for the second AL wild-card slot.

Seattle beat the Los Angeles Angels 4-1 after being eliminated.

The A’s will open this year’s postseason at Kansas City on Tuesday night, with Jon Lester facing the Royals’ James Shields.

The Royals went 5-2 against the A’s this season – both losses were to Lester.

It will be Oakland slugger Adam Dunn’s first playoff appearance.

He’s been in 2,001 games, the most by any active major leaguer without reaching the postseason.

“I played scenarios of this day out in my head probably a thousand times,” Dunn said.

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

The Pirates lost their chance to catch the Cardinals with a 4-1 loss to Cincinnati.

No matter, they’ll be back home at PNC Park, where they won the wild-card game last season.

“I expect it to be like last year: So loud you can’t hear the ball off the bat,” said Josh Harrison, who almost won the NL batting title.

Both of the best-of-five AL division series begin Thursday. It’ll be the wild-card winner at the Los Angeles Angels and the Tigers at Baltimore.

In NL openers Friday, the wild card plays at Washington and the Cardinals are at the Los Angeles Dodgers.

Price, acquired by Detroit in late July to win big games, stopped Minnesota 3-0.

The Tigers needed a victory to close out the Royals for the division title.

“On a day where we needed an enormous outing after giving up 20-something runs over the previous two, he stepped right up. He showed why he’s a true No. 1,” first-year Tigers Manager Brad Ausmus said.

Kansas City beat the Chicago White Sox in the final game of Paul Konerko’s career, 6-4.