All it took for the Yankees to start winning again was the arrival of the team with the best record in baseball.

The Yankees were able to put a bit more distance between themselves and their recent slide with Tuesday’s 5-1 win over the Royals in The Bronx. It was their second straight win over the defending AL champs as the Yankees won consecutive games for the first time in two weeks.

“It’s the same team,” manager Joe Girardi said of the turnaround, which has landed the Yankees back in first-place in the AL East after the Rays lost to the Mariners Tuesday night. “Teams go through ups and downs. We’ve just got to keep the downs shorter.”

Pitching performances like the one delivered by Adam Warren help. So does a four-RBI night by Mark Teixeira.

It was Warren’s third straight effective start, but he was most impressive Tuesday, surrendering just one run and two hits in 6 ¹/₃ innings.

He retired the first 10 batters he faced before Mike Moustakas reached on a single to short right, where second baseman Stephen Drew made a diving stop, but was unable to make the throw to first in time.

Warren attributed part of the success to a slight adjustment he made with his slider and not to the fact that he could soon be auditioning for his spot in the starting rotation with the possible return of Masahiro Tanaka as early as next week.

“I try not to think about that,” Warren said. “I’m happy just to pitch wherever they tell me.”

He pitched very well out of the bullpen a year ago and has yet to establish the same consistency as a starter, but perhaps the last three starts will be a turning point.

As for his future, Girardi said he would hold off on making any decisions.

“We’ll see where we’re at and what our needs are,” the manager said. “He’s pitching as well as anyone in our rotation right now.”

Warren’s job was made a bit easier with more first-inning firepower from the Yankees’ offense.

Mark Teixeira belts a two-run double during the fifth inning of the Yankees’ 5-1 win over the Royals on Tuesday night at the Stadium.Getty Images

One game after they erupted for eight runs in the opening inning against Kansas City starter Jeremy Guthrie, the Yankees got two more Tuesday when Teixeira hit a two-run homer off Jason Vargas.

Following a two-out walk by Alex Rodriguez, Teixeira turned on an 0-1 fastball and hit his team-leading 14th home run of the season.

The blast also gave the Yankees 50 first-inning runs this year, the most in the league.

The first baseman came through again in the fifth, delivering a double to the gap in right-center. Young and Rodriguez scored and Teixeira reached third when Lorenzo Cain couldn’t pick up the ball at the fence.

The Royals finally got to Warren in the sixth, as Paulo Orlando homered to right with one out.

The Yankees will try to complete the sweep of the Royals on Wednesday before they depart for a West Coast trip that begins Thursday in Oakland.

“You want to back up a win like [Monday’s] with a really good performance,” Teixeira said. “Fourteen runs is nice, but if you lose the next night, you’re back to where you started. So two in a row is really big for us.”

And like his teammates, Teixeira insisted he didn’t believe the world was crumbling despite the lack of wins.

“The law of averages says it’s gonna go in your favor every now and then,” Teixeira said. “We weren’t as bad as [losing] 10 out of 11, but we weren’t playing well.”
For the past two games, they have been.