NEW YORK (AP) — There are two constants to the Mets' season: injuries and wins.

They learned Thursday that Max Scherzer will join fellow ace Jacob deGrom on the injured list for a lengthy stretch. Then New York wasted a ninth-inning lead against the St. Louis Cardinals and fell behind in the 10th.

Pete Alonso ended an afternoon of twists with a two-run homer into the left field second deck leading off the bottom of the 10th for a 7-6 victory that sent the Mets flying even before they headed to Colorado for the start of a six-game trip.

“We're just a bunch of resilient guys, and we're gritty,” Alonso said after a 447-foot drive that was so emphatic he patted his chest five times with both hands before starting his trot. “When you get guys that are talented and love to win and are a group of tough men, you get games like this.”

New York took three of four from the Cardinals and at 26-14 is tied for the fourth-best 40-game start in Mets history. In a game with four lead changes, Jeff McNeil had a tiebreaking, two-run single, three RBIs and made two snazzy catches.

The Mets said during the game that Scherzer had been diagnosed with a strained oblique muscle in his left side after leaving Wednesday night’s win following a pitch. Scherzer is expected to be sidelined for six to eight weeks, another blow to a team that leads the NL East despite missing deGrom, No. 5 starter Tylor Megill and catcher James McCann to injuries, along with relievers Sean Reid-Foley and Trevor May.

“It’s a great opportunity for guys that we’re talking about bringing in here,” manager Buck Showalter said. "Got some guys that will meet us in Denver and try to hold fort.."

McNeil, hitting .400 with runners in scoring position, had a run-scoring infield groundout in the first and a two-run single in the fifth off Nick Wittgren that put the Mets ahead 5-3.

He climbed the wall in left-field foul territory to grab Paul Goldschmidt's seventh-inning sacrifice fly, pushed off with his right foot and threw to second to nab Brendan Donovan, who tried to tag up from first. Then, with a runner on first in the eighth, McNeil made a sliding catch on a soft liner to deny Dylan Carlson and threw to second from his back.

"He's the Flying Squirrel for a reason," Alonso said.

Goldschmidt had four RBIs for the banged-up Cardinals, who trailed 2-0 before rookie Juan Yepez homered in the second for the first of his three hits.

Goldschmidt went deep in the third off Chris Bassitt and his RBI double gave St. Louis a 3-2 lead in the fifth but Brandon Nimmo's RBI grounder tied the score in the bottom half.

Harrison Bader reached on an infield hit leading off the ninth for his third single, stole second for the second time on the day and advanced to third on a groundout. Goldschmidt tied the score 5-all with a two-out infield single off a foot of third baseman Eduardo Escobar as Edwin Díaz blew a save for the second time in 11 chances.

With the Cardinals in extra innings for the first time this year, Albert Pujols brought home the automatic runner with a run-scoring double-play grounder off Colin Holderman (1-0) in the 10th.

Alonso took a slider from Giovanny Gallegos (0-2) and turned on a fastball for a 114 mph drive, his third game-ending home run. Alonso has 10 home runs and leads the major leagues with 36 RBIs.

New York moved a season-high 12 games over .500 and finished 5-2 against the Cardinals to win the season series for the first time since 2014. The Mets have won 10 of 12 series this year and are 3-0 in extra innings.

“Pete saved us,” Bassitt said.

Bassitt allowed four runs and nine hits in 6 1/3 innings, while Hudson gave up four runs and five hits in 4 2/3 innings. Hudson paused for a four-to-five-second stop in every pitch from the stretch, contributing to a 3-hour, 41-minute game time.

“The pace of today's game wasn't really pleasant,” manager Oliver Marmol said. “It's just a matter of get the ball and get back on the mound — let's get going. There's a pace to it and an aggressiveness to it, to keep the infield annd outfield engaged, and I need to see more of that.”

He also promised bullpen changes.

“There will be some reshuffling of that and see who can get outs,” he said.

PROSPECTS ARRVING

LHP Matthew Liberatore, the 17th overall pick in the 2018 amateur draft, will be brought up by the Cardinals to start at Pittsburgh on Saturday in his major league debut. Libertore, acquired from Tampa in January 2020, is 3-3 with a 3.83 ERA in seven starts at Triple-A Memphis. St. Louis selected the contract of Nolan Gorman from Memphis, and he is to start at second base on Friday. Outfielder Tyler O’Neill (right shoulder impingement) was placed on the 10-day and RHP Jack Flaherty (right shoulder) was transferred to the 60-day IL.

OUCH!

Cardinals right-hander Andre Pallante took a 111 mph liner from Alonso off his left shoulder in the seventh that went for an infield single. McNeil, the next batter, hit a 99 mph comebacker off the pitcher’s left foot, and Pallante retrieved the the ball to throw to first for the out.

TRAINER’S ROOM

Cardinals: C Andrew Knziner left in the middle of the fifth inning after taking a pair of foul tips off his mask earlier in the game. ... INF Edmundo Sosa didn’t play after straining his left ankle while sliding into second when he was caught stealing in the fifth inning Wednesday.

UP NEXT

Cardinals: RHP Adam Wainwright (4-3, 3.15) takes the mound on Friday. Pittburgh starts RHP Zach Thompson (2-3, 5.47).

Mets: RHP Carlos Carrasco (3-1, 3.73) starts Friday’ against Colorado RHP Germán Márquez (1-3, 6.16).

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports