- Roger Federer was a point away from a tidy, straight-set victory in the Wimbledon quarterfinals. One lousy point.

And then, slowly, over the next two-plus hours as the spectators' cries of "Let's go, Roger!" echoed through the shadows, everything came apart for the eight-time champion against an opponent who'd never beaten him.

The top-seeded Federer blew a third-set match point and, eventually, all of his big lead in a 2-6, 6-7 (5), 7-5, 6-4, 13-11 loss to No. 8 Kevin Anderson on Wednesday in a 4-hour, 14-minute tussle.

"It was just one of those days where you hope to get by somehow," Federer said. "I almost could have. I should have."

He was leading by two sets and 5-4 in the third when, with Anderson serving, he got to ad-out. Federer managed to return a 134 mph serve, but on his next stroke, he shanked a backhand.

Back to deuce. From there, it all began to change. Anderson, a 32-year-old South African, held for 5-all, broke to 6-5 with a violent return winner off a 97 mph second serve, then staved off three break points and closed the set with a 133- mph ace.

The comeback was just beginning.

This was only the third time in Federer's 20 years of Grand Slam matches that he lost a match after winning the opening two sets; both of the other defeats came in 2011. And, according to the ATP, it's the fifth time Federer lost a match at a major tournament after holding a match point.

Federer was 4-0 against Anderson entering the day, winning every set they'd ever played. Federer was attempting to reach his 13th semifinal at Wimbledon and move closer to title No. 9, both of which would have broken his own records.

"I just kept on telling myself, 'I have to keep believing.' I kept saying that today was going to be my day, because you really need that mind-set taking the court against somebody like Roger," Anderson said. "If you go out there with doubts or unsure what's going to happen, like I maybe did a little bit in that first set, it's not going to go your way."

Anderson was the runner-up at last year's U.S. Open — the closest he's come to winning a Grand Slam trophy, while Federer owns 20.

Anderson never had made it beyond the fourth round at Wimbledon until this week, carried by his booming serve. He hit 28 aces against Federer.

"It's like that with the big servers," Federer said. "You're never really safe."

Next Anderson faces No. 9 John Isner of the U.S. on Friday. Isner reached his first Grand Slam semifinal by beating 2016 Wimbledon finalist Milos Raonic of Canada 6-7 (5), 7-6 (7), 6-4, 6-3, hitting 25 aces and saving the only break point he faced.

Three-time Wimbledon champion Novak Djokovic reached his first Grand Slam semifinal since 2016 by beating No. 24 seed Kei Nishikori of Japan 6-3, 3-6, 6-2, 6-2. He will meet top-ranked Rafael Nadal, who outlasted Juan Martin del Potro 7-5, 6-7 (7), 4-6, 6-4, 6-4 in 4 hours, 48 minutes — the longest match of this year's tournament.

Del Potro finished with 77 winners to Nadal's 67 but failed to convert any of his five break points in the fifth set.