Who knew the Mets were capable of beating the worst team in the National League?

After five straight losses against the Marlins the Mets last night refused to take “L” for an answer using a three-run rally in the seventh to secure a 6-5 victory at Marlins Park.

Jeremy Hefner struggled for a third straight start but the Mets broke their recent offensive silence — they had scored one run in each of three straight losses to the Nationals over the weekend — by collecting big hits late.

The drama concluded with Bobby Parnell retiring Giancarlo Stanton for the final out with the tying run at third base and winning run on first. Stanton swung at the first pitch and grounded weakly to second base.

“We got up early and lost the lead and came back” Parnell said. “It was up and down an easy game to just give up there at the end and guys battled back. It was a nice win for the team.”

Overall the Mets (47-56) have lost eight of 12 games against the Marlins this season. But the previous five straight had perhaps hurt the Mets the most — they came in a stretch of nine days following a four-game Subway Series sweep of the Yankees in which manager Terry Collins’ club had appeared to turn a corner.

Ike Davis’ RBI double in the seventh last night gave the Mets a 6-5 lead after Hefner put his team in a two-run hole the previous inning. For Davis it was a second big hit in less than a week: Last Tuesday at Citi Field he stroked an RBI double in the sixth that put the Mets ahead in a 4-1 victory over the Braves.

“I’m seeing the ball better right now” Davis said. “I’m not chasing pitches.”

Daniel Murphy’s RBI single in the seventh against lefty Mike Dunn started the comeback before Marlon Byrd delivered a run-scoring single against A.J Ramos to tie the game. Davis then hit a shot into the right-field corner and Byrd hustled around third just beating the throw home.

“I honestly didn’t think [Byrd] had a chance but he was running his butt off so that was awesome” Davis said.