CLEVELAND - The Yankees knew the deal well before Thursday night's first pitch.

Toronto already had posted its 11th straight victory. Win, and the Yankees would fly an hour northeast of here for this weekend's showdown series with the Blue Jays a half-game behind.

A loss would be their sixth straight and put their AL East deficit at 11/2 games.

"I think today's important," Joe Girardi said before the game. "Is it the end of the world? No, but I think it's a pretty important game."

There were some tense moments late, but the Yankees rose to the occasion, earning an 8-6 win over the Indians in front of 23,076 at Progressive Field.

The Yankees (62-51), who totaled nine runs in their previous seven games and were hitting .157 (37-for-236) in that span, had 10 hits Thursday night, including a three-run homer by Brian McCann in the first inning and a solo blast by Stephen Drew in the second. The oft-criticized second baseman had two hits, drove in two runs and scored four times, and Brett Gardner had three hits and three RBIs.

That put the Yankees in a better mood entering the Toronto series this weekend. Righthander Ivan Nova, who flew ahead to Toronto late Thursday afternoon, gets the start Friday night against David Price.

The beneficiary of the run support was Nathan Eovaldi, which was no surprise. The righthander entered the game with the second-highest support in the majors, 7.42 runs per game.

Eovaldi, who was 6-0 with a 2.87 ERA in his previous nine starts, wasn't quite that sharp, allowing four runs, seven hits and three walks in 51/3 innings.

Adam Warren came on with two on and one out in the sixth and induced a double play. Justin Wilson allowed two runners to reach with two outs in the seventh and gave way to Dellin Betances. The righthander loaded the bases and threw a wild pitch that made it 7-5 but struck out Abraham Almonte to end the inning.

Provided an 8-5 lead by Gardner's third hit, Betances allowed a leadoff double in the eighth but no more. He then handed it over to Andrew Miller. The closer, who blew a save for the first time this season Tuesday night, allowed an RBI single by Yan Gomes but earned his 25th save.

The Yankees jumped on righthander Trevor Bauer immediately. Ellsbury, given Wednesday off to clear his head as his skid hit 5-for-46, led off with a single and Gardner, in a 5-for-38 skid, drew a walk. Two outs later, McCann, who homered in Wednesday night's 2-1 loss, golfed a 2-and-1 fastball just fair down the rightfield line for his 20th homer and a 3-0 lead.

An inning later, Drew's 15th homer made it 4-0.

The Indians (53-60) got two of those runs back in the third. No. 9 hitter Giovanny Urshela led off with a walk and Jose Ramirez singled. After Francisco Lindor's sacrifice bunt moved the runners ahead, Michael Brantley delivered a sacrifice fly and Carlos Santana added a two-out RBI single to make it 4-2.

The Yankees drove Bauer from the game in the fourth. Didi Gregorius singled and scored on Drew's double off the wall in left. After Ellsbury struck out, Gardner doubled off the leftfield wall to make it 6-2 and end Bauer's night.

Gardner's RBI single in the sixth made it 7-2.