Bartolo Colon worked eight innings, and Eric Young's RBI ground-rule double in the seventh inning was the difference, as New York escaped St. Louis with a 3-2 victory in the finale of a three-game set.
Colon (7-5) scattered four hits and one run and exited with a 3-1 advantage. Jenrry Mejia entered and gave up a leadoff double to Matt Carpenter and plunked Jon Jay. A Matt Holliday grounder put both in scoring position, then Allen Craig bounced a single to third which scored Carpenter and pulled the hosts within a run.
Dana Eveland put an end to the rally by retiring Matt Adams on grounder to third, earning his first save of the season.
Young ended up with two hits and David Wright knocked in a run for the Mets, who avoided a sweep.
Carpenter scored twice and drove in a run for the Cardinals, whose five-game win streak came to a halt.
Lance Lynn (7-5) tossed six innings in defeat, allowing five hits and two runs while striking out five and walking four.