WIMBLEDON, England — For two decades, Roger Federer has reserved his most artful strokes and elegant footwork for Wimbledon’s Centre Court, where he has won a record eight men’s championships.

On Wednesday, facing an unlikely quarterfinalist in 14th-seeded Hubert Hurkacz, Federer played as if on unfamiliar ground, losing his footing on a critical point, netting multiple forehands and spraying an uncharacteristic number of groundstrokes wide of the mark.

Despite the urging of a capacity crowd, Federer never found a solution against a far more capable challenger and was swept out in straight sets, 6-3, 7-6 (7-4), 6-0, ending his bid to extend his men’s record of 20 Grand Slam titles, a mark he shares with Rafael Nadal.

The end came quickly and without remorse, with Federer sealing his defeat in the 1-hour 49-minute match with a final errant forehand.

As Federer gathered his rackets in defeat, fans awarded him an extended standing ovation and cheered as he raised a hand to acknowledge their support before walking off court.

Almost immediately, tennis analysts sought an explanation for his subpar performance. Was the grass-court master masking an injury? An illness? Fans sought reassurance that his retirement wasn’t at hand. Surely, Federer’s final set at Wimbledon wouldn’t end on the rank futility of a 6-0 score line.

Federer ruled out injury during his post-match news conference and offered thoughts, although nothing definitive, about what lies ahead, explaining that he planned to take a few days to consult with his advisers on his next step.

“Of course I would like to play [Wimbledon] again,” said Federer, who was competing in the most prestigious of the sport’s four Grand Slam events for the 22nd time. “But at my age, you’re just never sure what’s around the corner.”

With Nadal, a two-time Wimbledon champion, not competing at the All England Club this year, Federer’s quarterfinal ouster enhanced the already favorable prospects of world No. 1 Novak Djokovic claiming a sixth Wimbledon title and, with it, a record-tying 20th major.

Djokovic advanced to Friday’s semifinals earlier in the day with a 6-3, 6-4, 6-4 victory over Márton Fucsovics of Hungary.

For Federer, 39, there was no solace in the fact that he fell to one of his biggest fans. Hurkacz, 15 years younger, has often spoken of his reverence for the Swiss master. For most of their match, the 6-foot-5 Pole was the more fluid, commanding player on Centre Court’s tricky grass surface, which has been the setting for so many of Federer’s greatest triumphs.

A month shy of his 40th birthday and competing on a right knee that was twice surgically repaired in 2020, Federer probably had his best opportunity to extend his majestic mark at Wimbledon.

The goal of returning to this tournament had sustained him throughout his long, difficult slog of rehabilitation that unfolded in baby steps: First, he had to walk without crutches; then, start running; then, move side-to-side; and, lastly, step back onto a tennis court.

Federer’s pursuit was hardly folly.

Just two years ago, the last time Wimbledon was contested, he had come within one shot of victory. In fact, he had two match points against Djokovic but was edged 13-12 (7-3) in the fifth set of what proved the longest final in tournament history.

After an extended hiatus forced by surgery and the coronavirus pandemic, Federer resumed tournament play this spring, albeit haltingly, with his focus on peaking at Wimbledon.

From the start of Wednesday’s match, he looked uneasy.

“That’s part of having two knee surgeries and being close to 40: You have days when you’re not at your best,” former coach and touring pro Brad Gilbert, who called the match for ESPN, said in an interview. “Normally he can figure his way through those. Today, he didn’t look sharp from the first ball, and his opponent didn’t give.”

After Hurkacz claimed a tight first set, the players traded service breaks to reach a tiebreaker to settle the second set. With far more experience, Federer should have seized the upper hand. But trailing 3-2 and presented with the gift of an easy overhead to an open court, he slipped on his back foot and dumped the ball into the net.

It turned the match. Hurkacz won the tiebreaker; Federer didn’t win another game.

“We’re not used to seeing him slip,” Gilbert said. “It’s just a bummer to see it happen, but it shows you how tennis is. How life is.”

Afterward, Federer acknowledged that his rhythm was off on his normally reliable serve. The tiebreaker was “brutal,” he added, after having led 4-1 in the second set.

Then, trailing two sets to love, “things got complicated,” as he put it, careful to add that Hurkacz was the superior player and deserved to win.

“Clearly there's still a lot of things missing in my game that maybe 10, 15, 20 years ago were very simple and very normal for me to do,” Federer conceded. “Nowadays they don't happen naturally anymore.”

In Friday semifinals, Djokovic will face Canada’s Denis Shapovalov, 22, who gutted out the biggest victory of his career, a 3-hour 26-minute five-setter over big-hitting Russian Karen Khachanov. Shapovalov’s 6-4, 3-6, 5-7, 6-1, 6-4 win put him into the final four of a major for the first time. The other semifinal will pit Hurkacz against Italy’s Matteo Berrettini, who turned back Canada’s 20-year-old Felix Auger-Aliassime, 6-3, 5-7, 7-5. 6-3.