PARIS -- They know each other very well, and thus Roger Federer knew he couldn't regard Tuesday's French Open quarterfinal match against Stan Wawrinka as a mere appetizer for the salivating prospect of facing Rafael Nadal at Roland Garros again.

Wawrinka is playing his best tennis since returning from knee surgery 18 months ago. He seemed mentally energized after outlasting 20-year-old Stefanos Tsitsipas of Greece over 5 hours and 9 minutes in the fourth round -- the longest match of Wawrinka's career -- and confident his rehab and comeback had left him as sound and strong as before.

He doesn't concede a thing, and Tuesday on the Court Suzanne Lenglen, Wawrinka gave Federer fits, saving 16 of 18 break points. Even when the match was interrupted by a fast-moving storm when it was tied at 3 in the fourth set, the outcome seemed far from certain. During some extended games, you could see the two of them staring at each other with familiar consternation, as if thinking: That guy. Still can't fool him.

"There is no surprise anymore in what we are doing," the 24th-ranked Wawrinka said of Federer, whose 7-6 (4), 4-6, 7-6 (5), 6-4 victory set up a blockbuster Friday semifinal against Nadal. "It's just about who's gonna play the best in those important points, and he did that better than me today. He was a bit more aggressive in the right moment."

Federer had to bear down to get through Tuesday's "Swiss Open" against Wawrinka, as it was dubbed by the French daily sports newspaper L'Equipe. It was the 26th meeting between the two friends, countrymen, former Davis Cup champions and Olympic doubles gold medalists. And that, the folks who keep track of these things tell us, is the fourth-highest number of matchups in the Open era between men with one-handed backhands.

Two different art forms within the craft were on display: Federer's flowing follow-through and varied bag of tricks against Wawrinka's power. That punch has helped Wawrinka earn his only three victories against Federer -- all on clay -- against 22 defeats before Tuesday.

"I'm more positive than sad or disappointed with the result, because I know everything I have done to come back to that level," Wawrinka said.

Roger Federer, left, beat fellow Swiss countryman Stan Wawrinka in four sets Tuesday in the quarterfinals of the French Open. Martin Bureau/AFP/Getty Images

Federer's clean-shaven elegance alongside Wawrinka's stubble and rec player chic have made for an appealing contrast of characters in their long-running competitive theater. In 2015, a pair of loud plaid shorts became a totem for Wawrinka when he beat Federer in the quarters en route to the Roland Garros title -- the last time the two had faced one another here before Tuesday. Wawrinka draped the shorts on the dais at his postmatch news conference then in a humorous reproach to his fashion critics.

He deserves credit for how he's handled his path, as well.

"I'm a big fan of this sport," Wawrinka said. "So when you get the chance to have, in the semifinal of the French Open, Roger against Rafa, you're gonna put the TV on and watch. I always did in the past."

The quarterfinals clash was by far the most pressure the world No. 3 had experienced in this French Open, the first time Federer had dropped a set and the first time he'd had to pull such a variety of tools from his belt. He'll need to wield all of them with maximum sharpness to hold his own against Nadal, who has barely perspired in pursuit of his 12th Roland Garros title.

In his first matches at Roland Garros since 2015, Roger Federer will face Rafael Nadal for the sixth time at the French Open. Nadal is 5-0. Yoan Valat/EPA

"Like against any player, there is always a chance," Federer said, sounding more like a hopeful upstart than a 20-time Grand Slam event champion. He is 15-23 against Nadal, hasn't beaten him on clay in a decade and is 0-5 against the Spaniard at Roland Garros.

"I'm very happy to play Rafa, because if you want to do or achieve something on the clay, inevitably, at some stage, you will go through Rafa, because he's that strong and he will be there," Federer said. "I knew that when I signed up for the clay that hopefully that's gonna happen. If I would have had a different mindset to avoid him, then I should not have played the clay."

For his part, Nadal said he expected full-on aggression and all-court play from Federer, who, he said, has proved he has "the tennis to back it up," even after a four-year absence from Roland Garros.

"I hope to put him in trouble," Nadal said on court after steamrolling Japan's Kei Nishikori in straight sets. "Otherwise, I will be in trouble."