NEW YORK -- The uphill battle for the New York Mets to reach the postseason is not looking quite as steep these days, even as an unfathomable volume of injuries continues to rise.

Kelly Johnson delivered a tiebreaking three-run double with two outs in the eighth against A.J. Ramos, and the Mets beat the Miami Marlins, 5-2, Wednesday at Citi Field.

The Mets (69-64) have won the opening three games of this series against Miami and nine of their last 11 games overall. They are five games over .500 for the first time since July 28.

More important, the Mets have moved to within 1½ games of the St. Louis Cardinals for the National League's second wild-card spot. The Mets have leapfrogged the Marlins and Pittsburgh Pirates in the standings in recent days, so no one stands between the Mets and the teams who currently own the wild-card spots.

"I like our chances," general manager Sandy Alderson said Wednesday.

Kelly Johnson's eighth-inning double kept the Mets hot and caused joyous celebration. Noah K. Murray/USA TODAY Sports

Collins had the shortest of meetings after Wednesday's win to thank his players for not rolling over during tough times. The Mets had been two games under .500 as recently as 12 days ago and have managed to fight on amid all the injuries.

The latest blow: Second baseman Neil Walker has decided to undergo season-ending surgery to repair a herniated disk in his lower back, which was causing weakness in a leg and numbness in a foot. There's also uncertainty about when, or if, left-hander Steven Matz will return from a shoulder impingement.

"I told them we aren't having any more meetings," Collins said. "I took 30 seconds and told them how proud I was of the fact they've hung in there through all the injuries, all the different things that have happened. They've hung in there, and heading into this last month we're in a race."

As September begins, the Mets have a highly favorable schedule on their side down the stretch. After bidding for a four-game sweep against the Marlins on Thursday and then hosting the Washington Nationals this weekend, the Mets play only six of their final 25 games against teams with winning records.

Even questionable decisions are working out for the Mets these days.

Wilmer Flores, who generally has not faced right-handed pitching of late, was placed in the lineup Wednesday because of his career numbers against right-hander David Phelps (2-for-5 with a homer, two RBIs and a walk). When the Mets learned late that Phelps would not start because of an oblique strain and that right-hander Jake Esch would be making his major league debut instead, Collins left Flores in the lineup at first base instead of using James Loney. Collins reasoned that the Mets were not familiar with Esch anyway, and Flores had looked sharp at the plate a night earlier.

What happened? A half-inning after a pair of errors allowed the Marlins to take a 1-0 lead against Bartolo Colon, Flores launched a two-run homer against Esch in the second inning to give the Mets the lead.

Colon logged seven innings and came away with a no-decision after Christian Yelich's solo homer tied the score at 2-2.

Johnson's full-count, bases-loaded, three-run double in the eighth lifted the Mets to the win.

Collins cited the acquisition of Jose Reyes and the returns of Yoenis Cespedes and Asdrubal Cabrera from injuries for helping to spark the Mets' turnaround.

"We were going through a lot of stuff," Collins said, reflecting on the darker times, when even his job security was being questioned. "Again, you're dealing with human beings. We always think they can block stuff out. It's hard at times, because it's always there.

"There's always stuff from the outside that gets in there that can take the focus away from the plan -- 'well, woe is you; boy, you've got this guy hurt' -- instead of just concentrating on playing. When you start to get the pieces back, all of a sudden the attitude is, 'We're starting to get our guys back again. We can get some things done.' And they've just played much better when that's happened."