ST. PETERSBURG, Fla. - Wilmer Flores was in the lineup at shortstop for the Mets Friday night instead of Ruben Tejada because of "The Matrix."

Not the Keanu Reeves movie franchise. Terry Collins has a top-secret Mets-generated book that suggests many things, including what type of pitchers certain Mets batters should do well against. He calls it "The Matrix."

Because neither Flores nor Tejada had faced Rays starter Jake Odorizzi, "The Matrix" was activated. It spit out that Flores was a better bet against the righthander.

So that's why Flores was batting in the ninth inning of a tie game. And that's why Flores was able to dunk a two-out, go-ahead single to right to give the Mets a 4-3 comeback win over the Rays before a pro-Mets crowd of 23,145 at Tropicana Field.

The Mets, who tied it earlier in the ninth on rookie Michael Conforto's RBI double, have won seven in a row. They lead the Nationals by 2 1/2 games after Washington lost to Colorado.

"Unbelievable," general manager Sandy Alderson said. "As was the week before that."

advertisement | advertise on newsday

The week before last was punctuated by the Flores drama, when he was nearly traded, cried on the field and became a Mets folk hero. The Flores love has transferred from Citi Field to the two transplanted New Yorker-heavy stops on this road trip, Miami and St. Petersburg.

"It's awesome," Flores said. "The support that I get -- that we all get -- it's amazing."

It was the first time in franchise history that the Mets overcame three separate deficits in each of the last three innings to win a game, according to the Elias Sports Bureau.

Jeurys Familia earned his 30th save after a wild bottom of the ninth. With a runner on first and none out, Brandon Guyer grounded to third -- three times. The first two (one a double play and one a forceout) were correctly called foul balls. Juan Uribe got the out at second on Guyer's third grounder.

There were two battles going on at the Trop. The first was between Mets fans and Rays fans. Mets fans seemed to have the upper hand as chants of "Let's go Mets!" overwhelmed whatever people chant for the Rays.

Mets videos

Uribe and Daniel Murphy homered for the Mets. Both were game-tying shots, with Murphy's coming in the eighth. Evan Longoria put the Rays ahead in the bottom half with a solo homer off Tyler Clippard (1-0), but the Mets scored two unearned runs in the ninth against Tampa Bay closer Brad Boxberger (4-8).

"Tonight was pure character," Collins said. "They kept coming at us and we kept getting some big hits. Can't say enough. They know it means something. They know these games are big. "

Lucas Duda led off the ninth with a squibber to the left of the mound that Boxberger threw past first for an error. Duda moved to second on a wild pitch and scored one out later on Conforto's double.

"Incredible job by the team," Conforto said. "Awesome game. One of the more fun games I've been a part of. Awesome to be able to contribute that way."

Travis d'Arnaud's infield single moved Conforto to third before Kelly Johnson lined to short for the second out. That brought up Flores, who was greeted by a standing ovation in his first at-bat.

advertisement | advertise on newsday

Flores dunked the go-ahead hit in front of a diving Guyer in right. The next chant that was heard was Flores' name. Over and over.