MIAMI -- From his earliest days as a big leaguer, Jordany Valdespin has displayed a knack for pinch-hit home runs. His five pinch-hit homers last season set a franchise record, earning him his current reputation as a dangerous bat off the bench. His walk-off grand slam last week -- though it was his second at-bat after pinch-hitting earlier in the game -- lifted the Mets to one of their highest points of April.

The last-place Marlins knew all that, of course, but could not prevent the utility man from upsetting their plans for a series sweep at Marlins Park on Wednesday. Pinch-hitting for Juan Lagares, Valdespin hit a go-ahead, three-run home run in the sixth inning, leading the Mets to a 7-6 victory that snapped their season-high six-game losing streak.

"That's what he does," manager Terry Collins said. "For some reason, he loves to come off the bench. It's truly amazing what he's done as a pinch-hitter, both last year and this year. His eyes just seem to get bigger."

Trailing by three, the Mets opened the sixth inning with a double by David Wright, who moved to third base with two outs. Marlon Byrd followed with an RBI single, then Ike Davis singled to put the tying runs on base.

That brought on reliever A.J. Ramos and brought up Valdespin, who swung through one changeup before parking the next one he saw just over the right-field wall. With characteristic flair, Valdespin pumped his fist as he rounded the bases.

"It was a bad pitch up in the zone," Ramos said. "He was looking for it. He did what he's supposed to do with that pitch."

Valdespin's homer took Dillon Gee off the hook for what could have been another frustrating loss. Though Gee allowed nine hits in five innings, most of the damage came after Justin Ruggiano's first-inning single glanced off second baseman Daniel Murphy's glove. Ruggiano's hit plated one run, and Chris Valaika followed two batters later with a two-run double.

Gee settled down after that, allowing his only other run on Juan Pierre's RBI single in the fourth. The rally might have been worse had Lagares not thrown Nick Green out at the plate moments earlier, disrupting a string of three consecutive Marlins hits.

In retrospect, that play loomed large. The Marlins threatened to stick the Mets with another late loss when Lucas Duda misplayed Ruggiano's single with two men aboard in the seventh inning, resulting in an error that scored both runners. But Scott Atchison stranded the tying run on third base, and three other relievers -- including closer Bobby Parnell -- nailed down the final six outs in a one-run game.

"It's always nice to get one quick, without drama," said Parnell, who was unavailable to pitch during Tuesday's ninth-inning meltdown.

Wright initially put the Mets on the board with a leadoff homer in the fourth inning, but New York otherwise remained stagnant against Marlins starter Wade LeBlanc until the sixth. Two critical insurance runs came an inning later, when John Buck singled home Murphy and Wright, all of which was enough to reward Gee with his second victory.

"I wasn't really pleased with anything I did today," the starting pitcher said. "I actually almost feel bad for getting a win."

The Mets, most certainly, were not. Losers of six straight heading into the day, they had recorded 32 hits over their previous 60 innings and had not pitched well enough to overcome it. Their offensive malaise was such that Wright, despite a stiff neck, talked his way into the starting lineup both Tuesday and Wednesday.

"We need all the wins that we can get, especially with the way we've been playing right now," Wright said. "You want to try to be in there to help out, because obviously we've been struggling."

Their margin for error will grow only thinner on Friday, when they open a three-game set against the first-place Braves. Atlanta has a way of magnifying any team-wide deficiencies, and the Mets know it.

Wednesday's win was a critical step back toward satisfactory baseball -- and perhaps just in time.

"We're going into [a series against] one of the best teams in the National League," Wright said. "We're going to have to click, and we're going to have to be on point both offensively, defensively, pitching. We're not going to be able to get away with a lot of mistakes against those types of teams."