The game took 21 minutes. It lasted 30 points.

Novak Djokovic squandered five break points and lost an instant classic of a game but made his opponent, Stanislas Wawrinka, pay an awfully heavy price.

After dropping the epic third game of the final set Saturday, Djokovic broke the next time Wawrinka served, then didn’t falter once he had the lead. The top-seeded Serb withstood a 4-hour, 9-minute onslaught of Wawrinka’s massive groundstrokes to pull out a 2-6, 7-6 (4), 3-6, 6-3, 6-4 victory and advance to his fourth straight final at the U.S. Open.

“Well, I was thinking – I guess everybody was thinking – ‘Whoever wins this game is going to win the match,'” Djokovic said. “After he won the game, I thought to myself, ‘OK, I guess I have to fight against those odds.'”

He did, to improve to 20-7 in five-set matches, and now the 2011 champion will go for his second U.S. Open title Monday against the winner of the later semifinal between No. 2 Rafael Nadal and No. 8 Richard Gasquet.

“I’m going to go try to recover,” Djokovic said. “I’ll grab some popcorn and watch (the second semifinal) on TV.”

Maybe he should watch a replay of his own match.

It will be remembered for Game 3 of the final set, a back-and-forth roller coaster ride in which Djokovic had five opportunities to break for a 2-1 lead and lost them all.

Wawrinka had eight game points. Before the last, he gestured to the crowd to pump up the volume. Sensing the opportunity, Djokovic hammed it up, as well. Wawrinka followed that well-deserved break in the action with a 123-mph service winner up the middle.

Walking gingerly to his chair afterward, Wawrinka sat down and smiled throughout the break.

A set earlier, he needed a medical timeout to get his right thigh taped. How much longer could he possibly last? Especially against Djokovic, whose road to No. 1 has been highlighted by an improved diet and a focus on fitness that has made him, by almost every account, the most physically prepared player in the game.

Turns out Wawrinka did make Djokovic work for it. But his 57 winners – 26 from the forehand side – weren’t enough to get past Djokovic’s fast-footed defense.

Wawrinka must settle for a memorable showing in his first Grand Slam semifinal and, of course, with the victory in the game everyone will remember.

“It was a great tournament for me, a great semifinal here,” said Wawrinka, of Switzerland, who made it farther than his country’s most famous player, Roger Federer, for the first time in any of his 35 Grand Slam appearances. “A tough match. A tough loss.”

Wawrinka opened with about as flawless a first set as possible. He broke Djokovic twice over the first 18 minutes, and when he completed the second break with a sizzling crosscourt forehand winner – one of seven in that set – Djokovic simply glanced across with a look that landed somewhere between bemused and amazed.

Yes, Wawrinka was going to be there all day, and the scene near his changeover chair showed it. By the time the fifth set rolled around, it looked like his living room, strewn with towels, shirts, a warmup jacket and an assortment of rackets, including the mangled remains of one stick he smashed in the fourth set, which drew him a point penalty.

It was that kind of day; the players each won 165 points. And Game 3 was that sort of game.

It started innocently enough, with an ace and a forced error by Djokovic that gave Wawrinka a quick 30-love lead.

But when Djokovic scrambled to get to a deftly struck drop shot, then Wawrinka sprayed the reply wide, things started setting up for something special. Djokovic followed that hustle play with an acutely angled backhand for a winner to make it 30-30. Wawrinka hit a forehand winner to make it 40-30, and for the next 15 minutes, each man tried in vain to close out the game.

The final 23 points included six winners, two double-faults and at least one small rest break for Wawrinka after a cruelly efficient dink-lob-overhead combination of Djokovic’s chased Wawrinka off the court and onto the ledge near the front row.

The game came only four points short of one of the all-time classics – the 18-16 tiebreaker John McEnroe won over Bjorn Borg in the fourth set of the 1980 Wimbledon final. Sometimes lost in that retelling is that Borg overcame that heartbreak to win the fifth set, much the way Djokovic overcame Game 3 to pull out this fifth set.

The question now is whether Djokovic can recover for his final in time. He’ll have at least one thing in his favor: This year, the U.S. Open broke with its tradition of playing the men’s semifinal and final on back-to-back days, which gives Djokovic an extra day of rest.

But this was a grind, much like his five-set win over Juan Martin del Potro in the semifinals at Wimbledon in July. He returned two days after that one against Andy Murray and, clearly tired, tried to close out points at the net in what turned out to be a three-set loss.