Just what the Tampa Bay Rays need, a long, bullpen-taxing game Friday night to chase Thursday’s bullpen-taxing doubleheader sweep in Boston.

But that’s what they got against the New York Yankees at Yankee Stadium — a marathon. And if you’re going to play all night, you might as well win, which is what the Rays did, scoring five times in the top of the 14th inning for a 10-5 victory against the Yankees.

Desmond Jennings, who walked and stole second base, came home with the go-ahead run on a double by Sean Rodriguez.

It was one hit after another as the Rays put the game away.

David Price gave the Rays what they truly needed — a long outing by a starting pitcher.

Price pitched seven innings and allowed two runs, but the bullpen couldn’t protect a two-run lead.

Things became crazy after Price left.

Joel Peralta allowed back-to-back home runs in the eighth inning by Mark Teixeira and Alfonso Soriano to tie the score at 4.

Evan Longoria singled home Ben Zobrist in the ninth to put the Rays ahead.

Juan Carlos Oviedo allowed a two-out single to Jacoby Ellsbury that scored Brian Roberts in the bottom of the ninth to send the game into extra innings.

Brandon Gomes replaced Oviedo and picked Ellsbury off first before throwing his first pitch of the night. Ellsbury was originally called safe, but Rays manager Joe Maddon used a challenge, and the call was overturned.

Heath Bell, who hadn’t pitched since Monday night in Chicago, replaced Gomes with two out in the 11th and got out of a jam.

Bell pitched out of a 12th-inning jam with the help of — ready? — a double play that was scored 4-3-3-6-3-4-3-4-5-2. It started with a ground ball to Zobrist with runners on first and second and ended when Ryan Hanigan tagged Ellsbury during a rundown between third base and home plate.

The Rays almost pulled off a similar double play in the 13th, but they only got one out and the Yankees ended up with runners on second and third. The Rays went to a five-man infield, moving Rodriguez from first base (he replaced James Loney) to directly in front of second base and brought Wil Myers in from right field to play first base.

Yankees pinch-hitter Brett Gardner hit the ball right at Rodriguez, and Gardner was out at first base.

Bell then walked Ellsbury to bring up Derek Jeter and Jeter bounced back to Bell to send the game to the 14th inning.

Price allowed eight hits and two runs in his seven innings. He threw a season-high 118 pitches and struck out eight without allowing a walk.

Like he did Thursday night, Rodriguez got things started for the Rays with a second-inning double. It was the fourth extra-base hit in five trips to the plate for Rodriguez, who has made a habit of that this season. The double was Rodriguez’s eighth extra-base hit of the season and ninth hit overall.

A wild pitch moved Rodriguez to third base, where he was able to score on an infield hit by Loney.

Brian McCann followed a single by Soriano with a home run off Price that reached all the way to the first row of seats in right field in the bottom of the inning to give the Yankees the lead.

The score remained that way until the fourth inning when Longoria tripled on a ball center fielder Ellsbury misplayed. Myers followed with an RBI single to make it a 2-2 game.