LONDON — A day after the ATP Finals lost Rafael Nadal to injury, Roger Federer lifted spirits at the O2 Arena by extending his stay to the weekend.

The 19-time Grand Slam champion guaranteed his place in Saturday's semifinals by defeating Alexander Zverev 7-6 (6), 5-7, 6-1 on Tuesday.

With Novak Djokovic and Andy Murray also absent due to injuries, the top-ranked Nadal's withdrawal on Monday left Federer as the only member of men's tennis' 'big-four' in the tournament.

"It was nice to be able to show maybe that quality of mine, that I can dig out these matches, these points time and time again, stay mentally tough," Federer said. "In the third I started to play better. It was a tough match from the beginning till the end."

Zverev, who won his opening match against Marin Cilic, will face Jack Sock on Thursday to decide who will join Federer in the final four. Sock defeated Cilic in the early match, with Federer's victory eliminating the Croat.

"It was a very positive match," Zverev said. "Obviously he won it. He's in the semifinals. But even for me, I played the better match of the two today. I think I still have great chances of qualifying, playing Jack Sock next. I think if I continue having this level, I don't know, maybe you'll see me on the weekend still."

After an opening set dominated by serve went to a tiebreak, Federer came from 4-0 down and saved a set point to take the lead.

His grip on the match quickly tightened as a distracted Zverev made two double faults to gift a break in the opening game of the second set.

However, the 20-year-old regained his poise and took advantage of a dip in Federer's first serve percentage to break back and then repeated the feat to force a deciding set.

From there on it was all Federer. The six-time champion, who is 16-years older than his opponent, showed his big-match experience as he regrouped to break in the third game, before doing so twice more to seal the victory.

Sock's 5-7, 6-2, 7-6 (4) victory was the United States' first at the event in 10 years.

The No. 8-seed, who seized qualification by winning the final Masters event of the season in Paris, lost his debut match to Federer, but he is now 1-1.

While others might have been surprised at Sock becoming the first American to win at the elite season-ending event since Andy Roddick in 2007, the man himself wasn't.

"I wouldn't be out here playing, competing if I didn't think I could give myself a chance to win tournaments, to be here," Sock said.

"I'm not the type of guy that will just enter a draw and be happy to make the third round or the quarters or whatever. I'm here to win matches. I think if I do the right things and I play the right tennis, I can give myself a chance to play on the weekend of any tournament."

Cilic has now won only one of his eight matches overall at the season-ending tournament.

"Definitely not a great record, but I felt that I played even well last year," Cilic said. "In those three matches that I played, I had good chances at least to win. These two also. So just, you know, couple points away from closing those matches. A little bit unfortunate with that."