Roger Federer vowed to return to Wimbledon next year after a shock quarter-final defeat to Kevin Anderson denied him the chance of a ninth title.

Rafael Nadal and Novak Djokovic will contest a blockbuster semi-final on Friday, while eighth seed Anderson will face fellow big server John Isner, seeded ninth, for a place in the final.

Defending champion Federer was two sets up and had a match point in the third against Anderson, but almost three hours later, he trudged off on the end of a seismic 2-6, 6-7 (5/7), 7-5, 6-4, 13-11 upset.

Federer, 36, said: “Of course the goal is to come back here next year. I wouldn’t call it ‘unfinished business’. I felt like I did some good business here in the past already.

“So I’m all right. I’m just disappointed now.”

Federer was given a rare outing on Court One having been switched from his usual Centre Court domain for the first time in three years.

But he found himself in even more unfamiliar territory with an inspired Anderson’s relentless, thudding serve eventually overpowering the 20-time Grand Slam winner.

The final set lasted 90 minutes, and it was captivating.

Federer eked out a break point at 4-3, Anderson quickly snuffed it out, then Anderson served to stay in the match, and did so to love.

On they went, both holding to love for 10-10, but at 11-11 it was Federer who blinked first, a double fault handing South African Anderson a rare break point which he converted.

Anderson needed four more booming serves to reach a first Wimbledon semi-final, and he found them to deny Federer a 13th Wimbledon semi-final appearance.

“It’s just not one of my best days, but they don’t happen very often,” added Federer.

“It’s one of those average days when you have to try to win the match, and I just couldn’t get it done. So it’s disappointing.”

A jubilant Anderson said: “I just said to myself, ‘Today is going to be my day’.”

American Isner was a 6-7 (5/7), 7-6 (9/7), 6-4, 6-3 winner against Canadian Milos Raonic.

The other semi-final will pit two-time champion Nadal against three-time winner Djokovic.

Nadal, the world number one and second seed, came through a classic Centre Court battle against Juan Martin del Potro as a 7-5, 6-7 (7/9), 4-6, 6-4, 6-4 winner.