The Yankees’ knack for rallying at the eleventh hour took on a whole new meaning Wednesday night.

The team’s game against the Nationals got delayed, which was followed by yet another delay for its flight to Kansas City for three games against the Royals.

As if that wasn’t enough, a mechanical complication with the plane delayed matters further, forcing the flight to be cancelled.

Then came the real problem – all the hotels in D.C. were booked.

But the players didn’t lose any sleep – they just got their zzzz’s right in the airport.

“It was an unfortunate set of circumstances,” general manager Brian Cashman told Newsday.

The next morning, the Bronx Bombers were able to catch a flight – without further drama – out of Dulles International Airport.

The team’s series with the Royals starts Friday.