Who knew the Mets had a little Houdini in them?

Almost certain to lose on several occasions in the late innings last night, manager Terry Collins’ crew somehow kept escaping until finally delivering a knockout blow to the Braves.

Ruben Tejada and Daniel Murphy inflicted the final damage, each with an RBI single in the 10th inning that helped the Mets secure a 7-5 victory at Turner Field.

“That was a lot of fun to be a part of,” Murphy said after the Mets won their second straight and further buried the memory of a six-game losing streak that ended Wednesday. “That was awesome.”

John Buck, Lucas Duda, Marlon Byrd and David Wright all homered for the Mets. Wright’s solo blast against Craig Kimbrel — the best closer not named Mariano Rivera — tied the game in the ninth after Brandon Lyon allowed a run an inning earlier to put the Braves ahead.

“Against [Kimbrel], it’s almost close your eyes and swing hard and hope you hit it,” Wright said. “He’s as dominant as anybody in the game. So you’ve just got to hope he makes a minor mistake or really you don’t have much of a chance. On that one, it was kind of more luck than anything.”

For the Mets (12-15), it was a change of pace after losing two games to the Marlins earlier this week in the final inning. There was a 15-inning horror show on Monday and Lyon threw a wild pitch that allowed the winning run to score in the ninth inning the next day.

Collins said last night’s victory was probably the Mets’ best of the season.

“To come in here and have the lead and lose it and then come back twice is pretty special,” Collins said. “It was a big win for us.”

Byrd’s solo homer against Eric O’Flaherty in the eighth had tied the game after the Braves took a 4-3 lead against Scott Atchison an inning earlier.

Jeurys Familia recorded the final three outs after Bobby Parnell cleaned up Lyon’s mess in the ninth. With the winning run on third base and one out, Parnell entered and retired Jordan Schafer. After Andrelton Simmons walked, Parnell retired Justin Upton.