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

Top-seeded Novak Djokovic of Serbia squandered five break points and lost that instant classic of a tennis game but made No. 9 Stanislas Wawrinka of Switzerland 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. Djokovic withstood a 4-hour, 9-minute onslaught of Wawrinka’s massive groundstrokes to pull out a 2-6, 7-6 (7-4), 3-6, 6-3, 6-4 victory and advance to his fourth straight final at the U.S. Open, where he will play Rafael Nadal of Spain on Monday.

Second-seeded Nadal beat eighth-seeded Richard Gasquet of France 6-4, 7-6 (7-1), 6-2 in the second semifinal — a much less dramatic affair than the opener, in which Djokovic could feel the stakes rising with every point he played at 1-1 in the fifth.

Unlimited Digital Access. $1 for 4 weeks.

“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.’ ”

Djokovic improved to 20-7 in five-set matches.

Nadal and Djokovic will meet in their third final at Flushing Meadows in the last four years, the lone break coming last year when Nadal was out because of a knee injury. They split the first two meetings, with Nadal winning in 2010 and Djokovic in 2011.

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

In the third game of the fifth set, Wawrinka had eight game points. Before the last, he gestured to the crowd to pump up the volume and then hammered a 123 mph service winner.

A set earlier, he needed a medical timeout to get his right thigh taped.

“At the end of the first set, I started feeling my right leg,” Wawrinka said. “At that moment, I knew I was going to be out of fuel if I had to play a long match. I knew I would struggle physically against him . . .”


• In the women’s final Sunday, top-seeded Serena Williams of the United States will play No. 2 Victoria Azarenka of Belarus.

Williams beat Azarenka 6-2, 2-6, 7-5 for the title last year.