NEW YORK – The game took 21 minutes. It lasted 30 points.

Novak Djokovic squandered five break points and lost that instant classic of a game but made 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 No. 2 Rafael Nadal, who had a much easier time in a 6-4, 7-6 (1), 6-2 victory over eighth-seeded Richard Gasquet.

It will be the third Nadal-Djokovic final at Flushing Meadows in the last four years, the only break coming last year when Nadal was out with a knee injury. They split the first two meetings.

“Novak is an amazing competitor,” Nadal said. “His results say that he is probably one of the best players that I have ever seen.”

Nadal won easily despite dropping his first service game of the tournament. He had extended his streak to 73 when Gasquet broke him in the fourth game of the second set. Both men held until a second-set tiebreaker, which Nadal won 7-1 to end what little drama existed in the afternoon’s second match.

Fans certainly got their money’s worth in the first one.

“I managed to find my way through, to adjust, and to win,” Djokovic said. “That’s what counts.”

His victory will be remembered mostly for a game he lost — the third game 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.

Ninth-seeded 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.

“It was a really long game with some good points and some big mistakes,” said Wawrinka, of Switzerland, who made it further than his country’s most famous player, Roger Federer, for the first time in any of his 35 Grand Slam appearances.

“He was quite nervous. I was really tired,” Wawrinka added. “I was struggling physically, and it was not easy to keep the level quite high. But, for me, it was just important to fight and not to let him go and not to lose 6-1 or 6-2, but just to try to get every game I can.”

Playing in his first Grand Slam semifinal, 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.

The third 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.

“Even though I lost that game, I felt like, ‘OK, he’s getting a little bit more tired and maybe this is my chance to step in,'” Djokovic said.

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 on the grass 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.

“Hard court is my most successful surface,” Djokovic said. “This is where I can say I feel most comfortable and confident. Hopefully, I can perform better than I did in the Wimbledon final and maybe get a chance to win a trophy.”