Jose Reyes needed 20 innings to get something done at the plate.

Reyes hit a tiebreaking sacrifice fly to help the New York Mets beat the St. Louis Cardinals 2-1 in 20 innings on Saturday night in the longest game in the majors in two years.

"That's the happiest 0 for 7 I've ever had in my life,'' he said. "I played good defense, got the RBI, and we won the game. And finally, it's over.''

Francisco Rodriguez (1-0) got the win despite yielding the tying run in the 19th and starter Mike Pelfrey finished for his first career save in a game that included 19 pitchers and lasted 6 hours, 53 minutes.

It was the longest game in the majors since Colorado beat San Diego 2-1 in 22 innings on April 17, 2008.

"This was crazy,'' Pelfrey said. "I've been involved in some wild games but this was really something. I thought it was never going to end.''

Rodriguez said he threw as many as 100 pitches in the bullpen. He began warming up in the eighth and spent the next three hours getting up and then sitting down.

"I got up more than 10 times,'' he said. "Pretty much every inning.''

Jeff Francoeur also had a sacrifice fly for New York in the 19th, snapping a scoreless tie, but Yadier Molina singled in Albert Pujols with two out in the bottom half.

St. Louis left the bases loaded in the 10th, 12th and 14th and stranded 22 runners, including 14 in extra innings. Molina caught the whole game and went 3 for 9.

"The outcome was disappointing but the heart that the club showed was amazing,'' Cardinals manager Tony La Russa said. "I give them a standing ovation.''

It was the longest scoreless game in the majors since the Los Angeles Dodgers and Montreal Expos went 21 innings without a run on Aug. 23, 1989, according to STATS LLC. The Dodgers won that one 1-0 on Rick Dempsey's leadoff homer in the 22nd.

New York manager Jerry Manuel felt the key was the extra effort by Pelfrey, who threw a side session earlier in the day.

"Pelfrey asked to pitch. He stepped up and said, 'Hey I can do this,''' Manuel said.

Utilityman Joe Mather (0-1) became the first position player to lose a game since shortstop Josh Wilson for the San Diego Padres in a 9-6 setback in 18 innings against the Arizona Diamondbacks last June 7.

Mather hit for Colby Rasmus in the 10th and played center and third before taking the mound in the 19th for his first major league pitching appearance.

Angel Pagan started the 20th with an infield single and advanced to third on Mike Jacobs' base hit to right. Reyes followed with a fly ball to center field to give New York a 2-1 lead.

It was the Mets' longest game since they lost 4-3 to St. Louis in 25 innings on Sept. 11, 1974, and the fourth longest in franchise history by innings. It was New York's first win in a game that lasted at least 20 innings.

It was tied for the second longest in Cardinals history.

Johan Santana started the game for New York and struck out nine in seven innings, allowing just four hits.

"I spent more time as a spectator than I did pitching on the mound,'' Santana said.

Rookie left-hander Jaime Garcia gave up just one hit in seven innings for St. Louis -- a bloop single by Pagan leading off the sixth.

Infielder Felipe Lopez also pitched a scoreless inning for the Cardinals, and starting pitcher Kyle Lohse played three innings in left field.

NOTES: Pujols walked four times, two intentionally. ... St. Louis pitcher Adam Wainwright and Molina were presented their Gold Glove awards before the game. Pujols will receive his NL MVP award and Silver Slugger bat before Sunday's game. ... Mets 3B David Wright walked twice, giving him a major league-leading 16 total. ... Cardinals OF Matt Holliday, mired in an 0-for-16 slump, struck out three times. ... Reliever Pedro Feliciano made his 373rd appearance with the Mets, moving into fourth on the club's career list. ... Mather became the first St. Louis position player to register a decision since Jose Oquendo got the loss in a 7-5 setback against Atlanta on May 14, 1988.