Yankees manager Joe Girardi walks off the field during Game 5 of the ALCS. Photo: Charles Wenzelberg

ANAHEIM, Calif. — Mark Teixeira had finally awoken and Robinson Cano had actually registered a huge hit, and if that wasn’t a sign of the Apocalypse, it was at least a sign of midnight moving perilously close for the Angels.

The Yankees had done a 2009 Yankees thing. They had gone from scoreless and down four runs against John Lackey in ALCS Game 5 to knocking out the Angels ace and sending 10 men to the plate in the seventh inning, scoring six runs, and grabbing a two-run lead. The champagne was pushed into the visiting clubhouse, a 40th AL pennant for the Yankees was on ice and waiting.

And then manager Joe Girardi made another baffling pitching decision in this ALCS. The Yankees were off Wednesday and they are off today. So everyone in the bullpen was fresh and able to be pushed. A.J. Burnett had sat for a long time as Teixeira cleared the bases with a three-run double in the seventh and Cano delivered an RBI triple to put the Yankees ahead.

The bottom of the Angels order was due. Plus Girardi should know by now that Burnett is much more likely to press pitching from ahead then behind. And now the Yankees led 6-4.

The Yankees were nine outs away from the Phillies and the World Series. Girardi could have gone for the kill. He could have tried to use his best two relievers, Phil Hughes and Mariano Rivera, to tag-team the final nine outs. Instead, he sent Burnett back out.

“If he is around 105 pitches, it’s probably a different story,” Girardi said. “But because his pitch count was low and he felt great we stuck with him.”

So Girardi let Burnett’s low pitch count (80) influence him more than the righty’s history to squander good fortune. Burnett had done his job. He had put the Yankees behind 4-0 12 pitches into his effort, yet managed to bull through six innings. Now the Yankees led. It was time to get Burnett out. And after a postseason in which Girardi was incredibly quick to use his pen, this time he stalled. He waited long enough for Burnett to let the eight and nine hitters reach, inexcusably walking Erick Aybar to put the tying runs on base.

Now, Hughes did not distinguish himself. When he entered, there was a runner on third, two outs and the Yankees lead was 6-5. Would it have been different if Girardi had just begun the inning with Hughes? We will never know. In the situation in which he was deployed, Hughes crumbled, issuing a walk and then consecutive RBI singles.

“It is disappointing to get back into the game and then blow it on my shoulders,” Hughes said.

So rather than facing midnight, the Angels have life and the Yankees, well, they suddenly have some peril. The Angels won 7-6 and are within three-games-to-two in this best-of-seven.

The last time they were in an ALCS, in 2004, the Yankees led three-games-to-none and historically collapsed against the Red Sox. It is on their minds, no matter what the players and manager say.

There is rain in the forecast for tomorrow and if Game 6 is postponed, the Yanks very well may turn to CC Sabathia on full rest on Sunday. But if they are forced to use Sabathia again in this series — for a Game 6 or 7 — then even if the Yankees win, their ace would not be available for Game 1 of the World Series against the Phillies, and possibly not Game 2 either.

Girardi described this as “a missed opportunity.” And maybe that is all this was. A hiccup on the way to Ryan Howard vs. Alex Rodriguez, on the way to a 27th title. But as Johnny Damon said, “nothing is set in stone until you get that fourth win [in a series].”

And the Yankees let the Angels get away because Girardi trusted Burnett for too long, because Hughes could not cut an Angels’ rally short.

There was no relief and so there was no pennant. The champagne was wheeled away. The Yankees did not fly back East to ready for a World Series, but to try to ward off peril.