ST. LOUIS (AP) The New York Mets left 25 men on base and went 1 for 26 with runners in scoring position. In the end, they still managed to pull out a win.
Ruben Tejada hit a sacrifice fly in the 18th inning and Mets outlasted the St. Louis Cardinals 3-1 Sunday in the second-longest game this season.
Boston beat the Yankees in 19 innings in April. In this one, it took 5 hours, 55 minutes for the Mets to top the NL Central-leading Cardinals and avoid a three-game sweep.
After Tejada's bases-loaded fly gave New York the lead, Eric Campbell drove in another run with a squeeze bunt.
''Weird stat,'' Campbell said. ''Not something to be proud of but you get the `W' and it makes everything else better.''
New York loaded the bases in the 18th on singles by Wilmer Flores and Curtis Granderson followed by a sacrifice from Plawecki that Martinez didn't cleanly handle. Tejada followed with his deep fly and Campbell then bunted.
The game was scoreless until both teams got a run in the 13th.
Carlos Torres (3-4), the seventh Mets pitcher, gave up one hit in two innings.
Carlos Martinez (10-4), who was scheduled to start on Tuesday night, was pressed into relief and was the Cardinals' eighth pitcher. He allowed five hits and four walks in four innings.
''We were trying to stay away from Martinez but it got to the point where it was not possible,'' Cardinals manager Mike Matheny said. ''We needed him to come in and pitch some tough innings.''
The Mets got 16 hits and drew 13 walks. Kevin Plawecki hit an RBI single for their lone run until the 18th.
The Cardinals got 13 hits, including Kolten Wong's leadoff homer in the 13th inning, and five walks. St. Louis went 0 for 8 with runners in scoring position.
''We just couldn't push it across when we needed,'' Matheny said. ''It's a shame but they just kept coming.''
New York put at least one runner on base in every inning except the first and had runners in scoring position in all nine extra innings. The futile hitting with runners in scoring position was the majors' worst since at least 1974.
The Mets' total of stranded runners tied the third-most in major league history and they became the first team since Kansas City on June 6, 1991, to leave as many runners on and still win. Only Philadelphia (27) in 1973 and San Diego (26) in 1979 left more runners stranded in a game - and both teams lost.
''That's not good,'' Mets manager Terry Collins said. ''We aren't happy about that. Neither are some of the guys that left them on. I've never seen more flying helmets in my life.''
Mets starter Jonathon Niese gave up five hits in 7 2/3 innings. Cardinals rookie Tim Cooney pitched three-hit ball for 5 2/3 innings.
This wasn't the first time these teams endured a scoring drought against each other at Busch Stadium. They played 18 scoreless innings on April 17, 2010, before both teams scored in the 19th and the Mets won 2-1 in the 20th.
Granderson doubled in the 13th and scored on Plawecki's single off Carlos Villaneuva.
Wong tied it with his homer off Jeurys Familia. Jhonny Peralta singled with one out and went to third on a two-out double by Yadier Molina before Familia struck out Tommy Pham to extend the game.
Mets: OF Michael Cuddyer said after the game he might have to go on the disabled list if his sore left knee doesn't respond to treatment scheduled for Monday. He left the game in the bottom of the eighth after singling in the top of the inning.
Cardinals: OF Jason Heyward didn't start after exiting Saturday night's game because of leg cramps. Heyward also has been dealing with a head cold that Cardinals manager Mike Matheny said has been making the rounds through the clubhouse. Heyward later pinch hit.
Mets: Trailing Washington by two games in the NL East, New York opens a three-game series Monday at Nationals Park. Matt Harvey has not allowed a run in 13 innings while beating the Nationals twice this season. Gio Gonzalez starts for the Nats.
Cardinals: Have their last off day in July before opening a two-game series at Chicago against the White Sox on Tuesday.