ST. LOUIS — Jay Bruce hit a tiebreaking homer in the 10th inning, Yoenis Cespedes launched a majestic, three-run shot and the New York Mets rallied to beat the St. Louis Cardinals 6-5 on Tuesday night.

Bruce began the game batting .194 but broke out of his slump with three hits, including an RBI triple.

After his decisive drive to center field off Matt Bowman (0-1), the Cardinals claimed he missed first base and challenged. A 56-second replay review confirmed Bruce touched the bag, and the NL East-leading Mets (15-6) closed it out for their 10th comeback victory of the season.

“It feels good to help the ballclub a little bit,” Bruce said.

Cespedes’ homer off starter Luke Weaver tied it at 4 in the fifth. The drive traveled an estimated 463 feet to left field, the third-longest by an opposing player in the history of Busch Stadium III.

Bruce’s eighth-inning single sent Todd Frazier from first to third before Adrian Gonzalez tied it at 5 with a sacrifice fly.

Mets starter Zack Wheeler lasted a season-low four innings and gave up four runs. Former ace Matt Harvey gave up a run over two innings in his first relief appearance since being demoted to the bullpen.

Back-to-back doubles by Dexter Fowler and Paul DeJong off Harvey with two outs in the fifth gave St. Louis a 5-4 lead.

Robert Gsellman (3-0) pitched a scoreless ninth for the win, and Jeurys Familia earned his ninth save.

Bruce’s sinking line drive got past left fielder Marcell Ozuna in the second for an RBI triple. It was Bruce’s first triple in 174 games with the Mets.

Weaver lasted 4 2/3 innings. He gave up four runs and walked a career-high six as St. Louis had its three-game winning streak snapped.

Tommy Pham drove Wheeler’s 95 mph fastball 420 feet to center for a home run that gave the Cardinals a 2-0 lead in the first inning.

Kolten Wong doubled in a run and scored on Weaver’s single in the fourth to make it 4-1. Weaver’s single was the first time the Mets allowed an opposing pitcher to reach safely in 42 plate appearances this season.

WEB GEM: Wong made a diving play at second on Gonzalez’s grounder and threw him out from his knees for the first out in the second. Wong was playing in with Bruce at third. The play saved a run, and Weaver was able to strand Bruce at third.

TRAINER’S ROOM: Cardinals right-handed pitcher Sam Tuivailala and left-hander Ryan Sherriff have reported to Triple-A Memphis for rehab assignments. Tuivailala is scheduled to throw Wednesday, and Sherriff will throw later this week.

UP NEXT: Mets left-hander Steven Matz (1-1, 4.42 ERA) seeks his first win against St. Louis in the middle game of the series Wednesday night. Matz is 0-2 with an 8.64 ERA in two career starts against the Cardinals. St. Louis counters with right-hander Michael Wacha (3-1, 4.22), who has won his last three starts.