They are mortally wounded but still fighting.

Even as the Mets moved to the brink of NL wild-card elimination Tuesday night, manager Mickey Callaway’s crew had enough resolve to stage perhaps one last noteworthy comeback in 2019.

Brandon Nimmo drew a bases-loaded walk in the 11th inning to give the Mets a 5-4 victory over the Marlins at Citi Field.

Down to their final three outs in the wild-card race, the Mets had tied the game on Michael Conforto’s two-run homer in the ninth.

The Mets trail the Brewers by five games with five remaining for an elimination number of one. Either a Brewers victory or Mets loss over these final five games will eliminate the Mets.

“Looking to next year, if we don’t make it this year, it’s a great experience for a lot of these guys, the young guys who haven’t been through this,” Conforto said. “Just to understand that when we go through a stretch like we did in June where we couldn’t put a full game together or couldn’t hold a lead or couldn’t put runs on the board, those games really mattered. It’s going to come down to a couple of games we don’t get in by, if not just one, so we have got to keep that in mind next year.”

The Nationals clinched one of the NL’s wild-card berths Tuesday by sweeping the Phillies in a doubleheader. The Cubs also remain mathematically alive, tied with the Mets five games behind the Brewers.

Conforto’s second homer in three innings, a two-run blast in the ninth, tied it 4-4. Conforto had homered in the seventh to give the Mets their first runs after Sandy Alcantara blanked them for the first six.

In the ninth, J.D. Davis led off with an infield single before Conforto took Jose Urena over the fence in right-center for his 33rd homer.

Chris Mazza, Luis Avilan, Seth Lugo and Justin Wilson combined on four scoreless innings in relief behind sluggish Noah Syndergaard to give the Mets a chance. Jeurys Familia and Paul Sewald each pitched a scoreless inning after the Mets tied it in the ninth. Sewald received the win after beginning his career with 14 straight losses.

“It comes down to we couldn’t lose,” Sewald said.

Before the game, Callaway tried to make sense of a season in which a Cy Young front-runner (Jacob deGrom), slam dunk Rookie of the Year (Pete Alonso) and MVP candidate (Alonso) emerged. And yet, the Mets were clinging to slim postseason chances.

“When you have a Cy Young worthy starting pitcher, when you have one of the best rotations of baseball, when you adequately hit throughout the season and score runs, you have a MVP and Rookie of the Year candidate, you have a few All-Stars, you are hoping to be in the playoffs by this point, not just battling to get in,” Callaway said. “That didn’t materialize for us to this point, there is still a chance and this team will never give up.”

Syndergaard had a fourth straight underwhelming start, allowing four earned runs on 10 hits with seven strikeouts over five innings. It was a fourth straight start — with a third different catcher (this time it was Tomas Nido) — in which the right-hander pitched fewer than six innings and allowed four runs. Syndergaard will head into his final start of the season Sunday carrying a 4.30 ERA.

“I was plagued by a lot of weak contact and they were just finding holes,” Syndergaard said.

Jorge Alfaro’s grounder through the middle in the fifth went for an RBI single that extended the Marlins’ lead to 4-0. Neil Walker fueled that rally with a leadoff double in the inning.

Walker also doubled leading off the third and scored on Isan Diaz’s RBI single that put the Mets in a 3-0 hole.

Syndergaard was tagged for two runs in the second. Diaz homered leading off the inning and Austin Dean doubled with one out before Jon Berti delivered an RBI single.

“As long as there’s a chance we’re going to keep on going,” Callaway said. “We’ve seen in a five-game stretch anything is possible. That’s where we’re at.”