Aroldis Chapman’s high heat sets off bench clearing as Yankees beat Rays

The Yankees finally beat the Rays on Tuesday night, but not without some late drama.

With two outs in the ninth, Aroldis Chapman’s 101 mph fastball went behind Mike Brosseau’s head. After the umpires huddled, both benches were warned, and Chapman fanned Brosseau to finish the 5-3 Yankees win.

But before everyone left the field, the teams jawed at each other and had to be separated.

It was just the latest bit of fireworks between the rivals, who have accused each other of headhunting before.

The Yankees had been in danger of losing eight of nine to the Rays — or falling into a tie for second place in the AL East with the Blue Jays.

Gio Urshela’s go-ahead double in the bottom of the sixth of a tie game was especially welcome, as was his ability to somehow score on the play that highlighted the victory.

Aroldis Chapman is held back by umpires after the Yankees’ 5-3 win over the Rays. Chapman’s wild pitch near Mike Brosseau’s head caused the benches to clear at the end of the game.Getty Images

For the beaten-up Yankees, they need everything they can get. And with Toronto’s loss to the Marlins, they’re two games ahead of the Blue Jays.

On Tuesday, they also got a strong outing from Masahiro Tanaka, who allowed two runs in six innings, and a pair of homers from DJ LeMahieu, as the second baseman continued to lead the offense whenever he’s healthy.

LeMahieu hit his third leadoff homer of the season, a shot to left, in the bottom of the first to take a quick lead against Tampa Bay right-hander Trevor Richards.

The Yankees’ struggles with runners in scoring position continued in the second.

After singles by Urshela and Mike Tauchman to start the inning, Gary Sanchez hit into a double play. With Urshela on third, Kyle Higashioka ended the threat by striking out.

LeMahieu hit his second homer of the night, again off Richards, with one out in the third to make it 2-0. This one went out to right.

Tanaka made it through four innings without a hiccup, but he allowed a leadoff ground-rule double to left to Willy Adames in the fifth.

Kevin Kiermaier followed by sending a two-run homer into the second deck in right on an 0-2 pitch to tie the game at 2-2. They were the only runs given up by Tanaka.

Before LeMahieu came to the plate with two outs in the bottom of the fifth, Tampa Bay manager Kevin Cash pulled Richards for Ryan Thompson, and Thompson got LeMahieu on a hard comebacker to end the inning.

The game remained tied in the top of the sixth in part due to a terrific diving catch by Clint Frazier in right-center on a Joey Wendle liner for the second out.

In the bottom of the inning, Luke Voit singled and Aaron Hicks flied to right before Frazier hit one through the vacated right side of the infield to bring up Urshela with one out.

Urshela drilled a shot to center and the ball got by a diving Kiermaier. Voit and Frazier scored. The relay throw home from Adames sailed over the head of catcher Michael Perez.

The ball went to the backstop, and after initially hesitating, Urshela raced home. Thompson backed up the play and his toss back to Perez was in time to get Urshela, but Urshela used a nifty headfirst slide to get under Perez’s glove to score and give the Yankees a 5-2 lead.

Jonathan Loaisiga took over for Tanaka to start the seventh.

Tanaka threw 88 pitches one start after he was removed after five scoreless innings and just 66 pitches. The right-hander allowed two runs and struck out seven in the outing.

Loaisiga, pitching out of the bullpen with rookie Deivi Garcia almost assured another start in Friday’s doubleheader in Baltimore, gave up a one-out solo homer to Adames to cut the Yankees’ lead to 5-3.

But Zack Britton pitched a scoreless eighth in his return from a strained left hamstring and Chapman closed it for the save.