The St. Louis Cardinals and Detroit Tigers locked up division titles on Sunday, the last day of the regular season, while the Oakland Athletics earned a wild-card berth into the postseason.

The Cardinals secured top spot in the National League Central when the second-placed Pittsburgh Pirateslost to the Cincinnati Reds.

St. Louis will play the NL West champion Los Angeles Dodgers in a best-of-five Division Series that starts on Friday.

Pittsburgh, meanwhile, will play a one-off wild-card play-in game at home against the San Francisco Giantson Wednesday, with the winner moving on to an NL Division Series showdown against the NL East Champion Washington Nationals.

In the American League, Detroit won the Central when they beat the Minnesota Twins, condemning the second-place Kansas City Royals to a wild-card game against Oakland on Tuesday.

Oakland beat the Texas Rangers on Sunday to edge the Seattle Mariners for the second and final AL wild card.

The winner of the Kansas City-Oakland game will advance to an AL Division Series against the Western Champion Los Angeles Angels starting on Thursday.

The other AL Division Series, which also starts on Thursday, will match the Tigers against the AL East Champion Baltimore Orioles.