ST. LOUIS — A one-run loss to the Milwaukee Brewers left Kolten Wong and the St. Louis Cardinals frustrated.

Ryan Braun hit a solo home run in the ninth inning, leading the Brewers to a 2-1 win Sunday and dropped the Cardinals back in the NL wild-card race. They are a half-game behind the Mets for the second wild-card slot.

“I think every one in this clubhouse is leaving here mad today,” Wong said. “We know this is what we play this game for. This is where the excitement comes and it’s either show up or go home.”

In Saturday’s 5-1 win, the Cardinals scored five runs in the eighth to win the game. It didn’t work out that way Sunday.

St. Louis had tied it in the eighth when Matt Carpenter doubled and scored on Stephen Piscotty’s sacrifice fly off Tyler Thornburg (6-5).

But Braun gave Milwaukee the lead in the ninth. Thornburg struck out three in the ninth to give the Cardinals the loss.

“It’s always disappointing after getting it tied up,” St. Louis manager Mike Matheny said. “In these close games, you feel like you got a real shot and they’re always hard to swallow this time of year.”

Cardinals rookie Luke Weaver allowed three hits in six innings. He struck out eight with one walk.

“I learned a lot today,” Weaver said. “I went with the fastball and trusted it and mixed some off-speed pitches in early and it worked out. I got some ground balls and just attacked.”

The Brewers’ run off Weaver came in the first on singles by Scooter Gennett and Braun and a sacrifice fly from Chris Carter.

Milwaukee had just four hits in the game, with Braun getting the only one after the fifth inning.

“We know how good this team is this year and every year,” Braun said about St. Louis. “They compete. They are so good fundamentally. When they get a runner in scoring position, you know they’ll probably get him in. They did that there in the eighth but it wasn’t like last night. We stopped them.”

TRAINER’S ROOM

Cardinals: RHP Michael Wacha, who has missed 29 games with shoulder inflammation, is scheduled to throw a bullpen session Monday. He threw one Friday.

ACTIVATED

The Cardinals activated All-Star shortstop Aledmys Diaz from the disabled list. Diaz, 26, had missed 36 games since he broke his right thumb when he was hit by a pitch from the Marlins’ Andrew Cashner. At the time he was injured, Diaz was hitting a team-leading .312 with 14 homers and 57 RBIs in 96 games.

ATTENDANCE

The Cardinals eclipsed the 3 million mark in attendance for the 13th consecutive year and joined the Los Angeles Dodgers as the second team to pass the figure this season. It is the 20th time overall St. Louis has passed the 3 million total.

UP NEXT

Brewers: Wiley Peralta (6-9) will face Cincinnati’s Keyvius Sampson(0-1). Peralta, the opening day starter, earned a win in his last start Sept. 6 in a 12-5 victory over the Cubs.

Cardinals: Mike Leake (9-9) will face Chicago’s Kyle Hendricks (14-7) on Monday night at Busch Stadium. It will be Leake’s 199th career start. He was activated from 15-day DL (shingles) before his last start on Sept. 7 and allowed three runs in 4 1-3 innings for no-decision in a 4-3 loss to Pittsburgh.