Turner drew a bases-loaded walk in a sensational 13-pitch at-bat and Kirk Nieuwenhuis hit an RBI single with two outs in the ninth inning as the Mets rallied past Heath Bell and the Marlins 3-2 Thursday.

Pitching for the first time in a week, and working in a steady drizzle, Bell (0-3) couldn’t find the plate and sent the Marlins to their fifth straight loss. The All-Star closer walked four and threw a whopping 46 pitches.

Turner batted for reliever Ramon Ramirez with one out. The Mets’ pinch hitter deluxe fell behind in the count 0-2 and later fouled off seven pitches before his walk tied it at 2.

“That situation, I think it’s what every kid dreams about,” Turner said. “Except that they dream about hitting it out of the park, not drawing a walk.”

After a forceout at the plate, Nieuwenhuis hit a one-hopper off the right-field wall. Before that drive, the Mets were 0 for 16 with two walks when batting with the bases loaded this season.

The excitement, however, was tempered by the news that Mets starter Mike Pelfrey has a partial tear of a ligament in his right elbow. Pelfrey said he is “99 percent” certain he will have reconstructive Tommy John surgery that will sideline him until next year.

The Mets trailed 2-1 when David Wright drew a leadoff walk in the ninth. One-out passes to Ike Davis and Josh Thole loaded the bases for Turner, who’s 3 for 8 as a pinch hitter this year.

With each foul ball, Turner became more determined. After four straight fouls on a full count, Turner took a fastball low and away.

“When you’re up there for that long, you kind of get that locked-in feeling,” he said. “I don’t know if he’s ever thrown that many pitches in an inning in his career.”

The 46 were indeed the most Bell has thrown in a save situation. In five other outings, he’s tossed more.

“I felt really good. I felt that my pitches were there. I felt like I threw the pitches where I wanted for the most part. I think 95 percent of the time, I was right where I needed to be,” Bell said. “Yeah, I did walk some guys.”

As for the matchup with Turner, “I thought I’d get him, and then I just pulled on a fastball,” Bell said. “That pitch, I wish I could have that one back.”

The Mets finished off a three-game sweep. They were helped by Bell’s third blown save in five chances during his first year with the Marlins.

It was the second time this series that the Marlins walked four consecutive batters. Four pitchers combined to do it Tuesday night.

Ramirez (2-1) pitched two scoreless innings for the win.

Jose Reyes, Hanley Ramirez and most of the Marlins remained stuck in hitting slumps. Miami scored a total of only six runs during its five-game trip to Washington and Citi Field.

Reyes was hitless in four tries and went 1 for 12 in his first series against his former team. Booed loudly in every at-bat, the fleet leadoff man grounded into a close, inning-ending double play in the eighth with runners at the corners.

Ramirez, the former NL batting champion, also was hitless in four at-bats and is an 0-for-20 rut.

Niese gave up two runs on four hits in seven innings, walking none and striking out six. Nolasco allowed one run and five hits.

The Mets won while starting an entirely homegrown lineup for the first time since 1971, according to research provided to the Mets by the Elias Sports Bureau.

Gaby Sanchez made it 1-all with his first home run of the season, a long drive leading off the Miami third.

Omar Infante hit a leadoff double in the Miami fifth and took third on a bloop single by Giancarlo Stanton — the Marlins had been hitless in their previous 24 at-bats with runners in scoring position. Befitting their recent offensive woes, the Marlins then went ahead without a hit, getting a run when Sanchez bounced into a double play.

Ramirez, Reyes and Stanton all had early fielding problems. Stanton dropped a long fly to right field by Nieuwenhuis leading off the Mets’ first for a triple and Ruben Tejada followed with a sacrifice fly.

Wright later grounded a double down the third base line past Ramirez. The converted shortstop tapped his glove when the ball was hit, anticipating a play, but let it get past him. A trainer came from the dugout to check if Ramirez was OK.

In the second, Reyes seemed to nonchalantly chase a soft liner by Davis. The ball glanced off the All-Star shortstop’s glove and was ruled a single