Yunel Escobar homered off Boston closer Koji Uehara leading off the ninth inning to propel the Tampa Bay Rays to a 6-5 win and a day-night doubleheader sweep of the Red Sox on Thursday night.

Escobar crushed the second pitch from Uehara (0-1) over the Green Monster in left field for his second homer of the year, and Grant Balfour recorded the final three outs for his second save of the day and sixth of the season.

Sean Rodriguez and Desmond Jennings also went deep for Tampa Bay, which won for just the third time in nine games.

Jake McGee (2-0) earned the win with one inning of scoreless relief.

Tampa Bay won the opener, 2-1. David DeJesus had a homer and drew a bases-loaded walk, and the Rays’ bullpen pitched 4 1-3 scoreless innings.

The victory wasn’t without controversy, though.

With the Rays leading 2-1 in the seventh, Dustin Pedroia was called out on a close play at the plate, thrown out on a relay from Escobar at shortstop while attempting to score from first on Ortiz’s double high off the Monster.

After a 1 minute, 52 second delay, it was announced the call “stands.”

Boston third base coach Brian Butterfield was ejected by first base umpire Toby Basner for slamming his helmet to the ground.

“I just don’t like the whole inconclusive deal,” said Pedroia, who didn’t think he was tagged before crossing the plate. “Replay, you should go check it out and you’re either out or safe. I don’t know what inconclusive means. Maybe that means someone doesn’t want to make a decision.”

The second game was a bit smoother, but just as frenetic.

Rodriguez’s two-run homer off Boston starter Felix Doubront in the sixth brought the Rays within 5-4, and Rodriguez tied it in the seventh off reliever Junichi Tazawa, doubling and scoring on James Loney’s single.

Boston threatened against Balfour in the ninth. Shane Victorino led off with a double and took third on Ortiz’s groundout, but was stranded there when Balfour fanned Napoli and struck out Xander Bogaerts looking to end the game.

Rays’ starter Chris Archer (2-2) allowed just one hit through four innings but was wild in the fifth, loading the bases on three walks before hitting Victorino with the first pitch of his at-bat.

Ortiz followed with a two-run single to right that put Boston in front 3-2, and Napoli and Sizemore added RBI singles.

Archer allowed five runs and three hits in 4 2-3 innings, walking five and striking out three.

Doubront gave up four runs — three earned — on five hits in six innings. He struck out five and walked one.

In the first game, Jonny Gomes had an RBI single for the Red Sox.

Brandon Gomes (2-1) got four outs for the win.

Boston’s Jake Peavy (1-1) gave up two or fewer runs for the fifth time in six starts, holding the Rays to two and three hits in 6 1-3 innings.

Rays starter Cesar Ramos allowed just one run and one hit over 4 2-3 innings, walking six and striking out six.

NOTES: The opener was the makeup of Wednesday night’s game that was postponed because of inclement weather. . It was the first doubleheader for both teams since last year when the Red Sox swept the Rays in Fenway Park on June 18. … The Rays open a three-game series against the New York Yankees on Friday. Tampa Bay LHP David Price (3-2, 4.75) will oppose New York LHP Vidal Nuno (0-0, 6.59). . Boston will host the Oakland Athletics for a three-game series beginning Friday, with Red Sox RHP Clay Buchholz (1-2, 6.66) facing Athletics’ RHP Dan Straily (1-1, 5.14).

Join our Newsletter for the latest news right to your inbox