Yankees rally past Rangers to move back into second wild-card spot

Just like everything else this season, it didn’t come easily for the Yankees, but they outlasted the Rangers, 7-3, on Wednesday night in The Bronx, putting themselves back in the playoff picture.

Thanks to Toronto’s loss to Tampa Bay, the Yankees moved back into the second AL wild-card spot by half a game.

The three-game sweep of Texas sets up a wild end of the regular season. The Yankees have Thursday off, followed by nine games against the Red Sox, Blue Jays and Rays.

“What’s comforting is we’re in control of things,’’ manager Aaron Boone said. “Regardless of what happened [Wednesday], we’re in control of things. It’s on us. It’s right in front of us. If we go out and play well, we’ll get to we’re we want to go. If we don’t, we go home. We don’t have to get help from anyone else.”

The Yankees showed their resolve — after displaying their flaws — on Wednesday.

Gary Sanchez watches his two-run homer in the eighth inning of the Yankees’ 7-3 comeback win over the Rangers.

After falling behind by three runs thanks to some poor defense and a lack of timely hitting, the Yankees stormed back with seven unanswered runs, taking the lead on Gleyber Torres’ RBI double that drove in Joey Gallo with two outs in the eighth inning.

Torres then hustled home from second for an insurance run when Texas second baseman Yonny Hernandez fumbled a Gio Urshela grounder. Gary Sanchez put the game away with a two-run home run.

They won though they went 1-for-10 with runners in scoring position earlier in the game and seemed determined to let the last-place Rangers escape with a win.

Corey Kluber, coming off six shutout innings against Cleveland last Friday, wasn’t as sharp in this start. The right-hander allowed three runs in just 4 ¹/₃ innings, with the Rangers scoring single runs in the second, fourth and fifth.

On the other side, the Yankees couldn’t get to Texas lefty Taylor Hearn for the first four innings (they left two on in the second), before breaking through in the fifth.

Torres led off the fifth with a walk and moved to second on an Urshela single up the middle.

Kyle Higashioka belted a double to center that scored Torres and Urshela — who ran through third-base coach Phil Nevin’s ill-advised stop sign to make it 3-2.

Higashioka advanced to third on a groundout by Brett Gardner.

With one out, DJ LeMahieu hit a fly ball to right. Adolis Garcia caught it and rifled a perfect throw to the plate to get Higashioka for the third out, keeping the Yankees down by a run.

A bases-loaded wild pitch by Texas reliever Dennis Santana scored Aaron Judge to tie the game in the sixth.

Clay Holmes pitched a scoreless seventh and the Yankees wasted another chance in the bottom of the inning.

Higashioka led off with a bloop single and was replaced by pinch-runner Tyler Wade. Wade stole second as Gardner whiffed for the first out. With LeMahieu up, Wade stole third without a throw. LeMahieu, however, then struck out and Anthony Rizzo flied to shallow center.

Gleyber Torres celebrates with teammates after scoring a run in the eighth inning of the Yankees' 7-3 win over the Red Sox.
Gleyber Torres celebrates with teammates after scoring a run in the eighth inning of the Yankees’ 7-3 win over the Red Sox.
Robert Sabo

Chad Green pitched a scoreless eighth before the Yankees went ahead in the bottom of the inning.

After Judge popped out and Stanton struck out, Gallo blooped a two-out double to left in the eighth before Torres knocked an opposite-field double to right to make it 4-3. Sanchez, who came on after Higashioka was pinch-run for, homered to close out the scoring.

Aroldis Chapman finished it with a 1-2-3 ninth.

Now the Yankees will look to finish the regular season in similar fashion against some of their toughest rivals.

“This is who we’re up against, fighting for the same thing,’’ Boone said. “You should want it no other way. We’re gonna find out [who’s the best]. When you’re fighting for a couple spots [among] a few teams, the fact you get to settle it mano a mano on the field, that’s the way it should be. Hopefully we get where we want to go by playing good baseball.”