For the fourth year in a row, the Cardinals are in the postseason.
St. Louis was assured of at least an NL wild-card spot when Milwaukee lost to Pittsburgh on Sunday, 1-0.
MORE: Full standings | Wild-card standings | Scoreboard | Postseason dates
St. Louis led the NL Central by three games over the Pirates going into its game Sunday night at home against Cincinnati, which they lost, 7-2.
"There wasn't a lot of high-fiving," Cardinals manager Mike Matheny said before Sunday's game. "The guys have their minds on, "OK, what do we have to do to win the division?"
Adam Wainwright, Yadier Molina and the Cardinals went to the World Series last year and lost in six games to Boston. The previous two seasons, St. Louis made the playoffs as a wild-card team.
Jay Bruce hit two of Cincinnati's four homers as the Reds snapped a six-game losing streak. Todd Frazier and Devin Mesoraco also went deep.
Reds right-hander Alfredo Simon (15-10) allowed two runs and seven hits in six innings. He was working on a 17-inning scoreless string before St. Louis scored in the fifth.
The Cardinals are the fifth team this season to clinch a playoff slot. Baltimore, Washington, the Los Angeles Angels and the Dodgers already won spots.
Pittsburgh won as Vance Worley pitched eight sparkling innings, Russell Martin hit a late RBI single and the Pirates trapped a runner in the ninth, extending their wild-card lead over the Brewers.
The Pirates tied San Francisco atop the NL wild-race race, 4 1/2 games ahead of Milwaukee. Andrew McCutchen singled and scored in the seventh, helping Pittsburgh take two of three from the Brewers.
In San Diego, the reeling Giants managed just six hits off Ian Kennedy and three relievers, losing to the Padres, 8-2, and falling 4 1/2 games behind the Dodgers in the NL West. The Dodgers beat the Cubs, 8-5. San Diego swept the three-game series. The Giants are still in good shape for a wild-card berth — they're tied with Pittsburgh, 4 1/2 games ahead of Milwaukee.
In the American League, Nori Aoki hit a two-run triple, helping Jeremy Guthrie and the Royals increase their lead in the AL wild-card race by beating the Tigers, 5-2. The Royals avoided a three-game sweep and moved within 1 1/2 games of the AL Central-leading Tigers. Kansas City also opened a 1 1/2-game edge over Seattle for the second wild-card spot.
Aoki's triple in the fourth scored Omar Infante and Mike Moustakas to break a 2-all tie and finish Rick Porcello (15-12). Porcello is 0-4 in his past five starts. He yielded four runs on nine hits and two walks in 3 1-3 innings.
Sunday's other key games:
Astros 8, Mariners 3: Seattle's playoff hopes took another hit, as Jake Marisnick had a three-run homer for the second straight game to lead the Astros over the Mariners. Houston took two of three from the Mariners, dropping them 1 1/2 games behind Seattle for the second AL wild-card spot.
Indians 7, Twins 2: Corey Kluber matched a career best by striking 14 for the second straight start and the Indians didn't lose any ground in the playoff chase with a win over Minnesota. The Indians have won five of six. Cleveland is 3 1/2 games behind Kansas City for the second AL wild-card spot, and hosts the Royals for three-plus games beginning Monday. In addition to Monday's regularly scheduled meeting, the teams will complete the Aug. 31 game in Kansas City that was suspended in the middle of the 10th inning due to rain with Cleveland up 4-2.
Dodgers 8, Cubs 5: Matt Kemp homered and drove in four runs, Yasiel Puig scored a career-high four times and the NL West-leading Dodgers beat the Chicago Cubs. Kemp had four hits for the Dodgers, who clinched a playoff berth on Friday and lead San Francisco by 4 1/2 games. The Giants start a three-game series at Dodger Stadium on Monday.
A's 8, Phillies 6, 10 innings: Josh Donaldson hit a towering, two-run homer into the left-field bleachers with one out in the 10th inning, lifting the Athletics over Philadelphia. The A's lead the AL wild-card race by a half-game over Kansas City, with Seattle 1 1/2 games behind the Royals. Nate Frieman singled with one out against Miguel Gonzalez (0-1) to set up Donaldson's shot.
Yankees 5, Blue Jays 2: Masahiro Tanaka made a triumphant return from an elbow injury that sidelined him for 2 1/2 months and a rejuvenated Derek Jeter got two more hits on his final homestand, leading the Yankees over Toronto. The Yankees are 4 1/2 games out of the second AL wild-card spot with a week left. Jeter went 8 for 15 with two doubles, a home run and three RBIs in his next-to-last home series. The retiring 40-year-old captain saluted the crowd after sharing postgame handshakes and high-fives with his teammates. Tanaka (13-4) made his first start since being sidelined by a small tear in his elbow in early July. He has tried to recover with rest and rehabilitation, rather than Tommy John surgery. Tanaka allowed one run and five hits in 5 1-3 innings with four strikeouts, no walks and a hit batter. As promised, Yankees manager Joe Girardi removed him after 70 pitches.
MAGIC NUMBERS
Detroit, 7; St. Louis, 5; Los Angeles, 3.
AL CENTRAL
Detroit, 86-69, ---
Kansas City, 84-70, 1.5 GB
Cleveland, 81-74, 5 GB
AL WILD CARD
Oakland, 85-70, +0.5
Kansas City, 84-70, ---
Seattle, 83-72, 1.5 GB
Cleveland, 81-74, 3.5 GB
New York, 80-75, 4.5 GB
NL CENTRAL
St. Louis, 87-69, ---
Pittsburgh, 84-71, 2.5 GB
Milwaukee, 80-76, 7 GB
NL WEST
Los Angeles, 89-67, ---
San Francisco, 84-71, 4.5 GB
NL WILD CARD
San Francisco, 84-71, —
Pittsburgh, 84-71, ---
Milwaukee, 80-76, 4.5 GB
MONDAY'S KEY GAMES
American League
Cleveland 4, Kansas City 2, 10 innings, comp. of susp. game, 6:05 p.m.
Baltimore (W.Chen 16-4) at N.Y. Yankees (Pineda 3-5), 7:05 p.m.
Kansas City (D.Duffy 8-11) at Cleveland (Carrasco 8-5), 7:05 p.m.
Seattle (Paxton 6-3) at Toronto (Happ 9-11), 7:07 p.m.
L.A. Angels (C.Wilson 13-9) at Oakland (Samardzija 4-5), 10:05 p.m.
National League
Pittsburgh (F.Liriano 6-10) at Atlanta (Harang 11-11), 7:10 p.m.
St. Louis (Wainwright 19-9) at Chicago Cubs (T.Wood 8-12), 8:05 p.m.
San Francisco (Peavy 6-4) at L.A. Dodgers (Haren 13-11), 10:10 p.m.
The Associated Press contributed to this report.