With a résumé that includes a record 17 major championships, 302 weeks at No. 1 and the career Grand Slam, Roger Federer has accomplished just about everything possible to achieve on a tennis court.

But the 33-year-old Swiss had never rallied from a match point down to win a Grand Slam match until Thursday night, when he fought back from a two-sets-to-none deficit for a 4-6, 3-6, 6-4, 7-5, 6-2 win over 20th-seeded Gaël Monfils in the U.S. Open quarterfinals.

With the win, the second-seeded Federer improved to 26-1 in night matches at Arthur Ashe Stadium and advanced to semifinals at Flushing Meadows for the ninth time in 11 years. He'll face Croatia's Marin Cilic, the No. 15 seed.

Here's how Federer managed to fight back from the brink of eliminaton for one of his gutsiest victories ever.

He weathered his opponent's best shots early.

No one has ever doubted Monfils' pure athleticism. The 28-year-old battered Federer with powerful forehands and sexy shotmaking. Whenever Federer tried to mix in a drop shot for a change of pace, Monfils was all over it.

The elastic Frenchman took the first set, then broke immediately in the opening game of the second. By the time Federer pushed a backhand into the net — his 26th unforced error of the match — to give Monfils a two-sets-to-none lead, it seemed as if the 33-year-old father of four was bound for elimination.

Yet even while he played his one of his worst matches of the season, Federer's focus was enough to keep him on course. He broke Monfils immediately in the third and used the emotional lift to reverse the flow of the match.

"I was getting on his serve, and I had opportunities, but I was just not hitting my forehand very well," Federer said afterward. "It wasn't working. I think definitely it had something to do with Gaël, the way he was playing me. But I knew I could play better tennis, and I knew that once I started to play better I would be in control again."

He made the best of the conditions.

The blustery conditions on Ashe played havoc for both players, but it was Federer whose error-strewn play seemed most affected in the early going.

This is what I mean by the effect the wind is having on this match. Both guys (smartly) aiming for the red boxes: pic.twitter.com/BMSgP05Aav

Yet the conditions had settled considerably by the time Federer began his fightback in the third set, in which he struck 15 winners against just one unforced error.

"It was a tough first couple of sets and it was actually quite frustrating," Federer said. "The wind was blowing so it wasn't helping finding the rhythm. I'm happy I got off to a good start in the third and calmed things down a bit, the nerves, and I was able to find my game. As the match went on I started to play much, much better."

Federer made Monfils beat him.

Federer was 53 of 74 on net approaches — a 72% success rate — playing the role of aggressor and forcing Monfils to attempt passing shots in haste. But it was the Swiss maestro's variety that really pushed Monfils to the limit.

"He starts with chipping very well," the Frenchman said. "I think I handed it good. So then he sticks with longer points. It was 50-50, and then he tries to come to the net very often. It was a bit better for him. Then suddenly he start to mix everything.

"You know, that's why he's the greatest player. Because he can do everything."

He was at his best when his back was up against it.

Serving to stay in the match at 4-5 in the fourth, Federer played a few loose points to fall behind 15-40 and give Monfils double match point. With a crowd of more than 23,000 spectators tightly wound, Federer stepped up to the baseline.

"I thought," Federer said , "'This is it. This is the last point, man. Just go down fighting, don't miss and easy shot and let him have it.'"

... and then ...

... suddenly there was new life for the five-time U.S. Open champion.

Federer ultimately held for 5-5, then watched as Monfils committed back-to-back double-faults that cost him the game and the set. When Federer broke to open the fifth, Monfils' capitulation was complete and it was downhill from there.

And then he imploded — maybe a bit later than people expected — but an implosion all the same. He quickly went down a double break in the fifth and Federer needed only land the plane to complete his eighth career win from two sets down at a major.

Wow-- that was the move of an eccentric self-destructive genius. Monfils might as well have cut off his ear.