Roger Federer says he was "lucky" after surviving a scare against Jo-Wilfried Tsonga to reach the Halle Open quarter-finals.
Top seed Federer, 37, beat French world number 77 Tsonga 7-6 (7-5) 4-6 7-5.
The eight-time Wimbledon champion is bidding for a 10th Halle title.
World number five Alexander Zverev withdrew from the doubles due to a knee injury but beat American Steve Johnson 6-3 7-5 to reach the last eight of the singles.
Federer will play Spaniard Roberto Bautista Agut in the next round at the grass-court tournament, while German 22-year-old Zverev will face Belgian David Goffin.
World number three Federer was a set and a break up against Tsonga, 34, before the Frenchman came back to take the match to a third set.
"I knew when I gave away that lead that it would be tight. Then it was about holding my nerve," said the Swiss.
"The third set was more of a battle. I tried to stay calm. It had a bit of everything: happiness, sadness, frustration. It was a bit emotional at the end, which was nice."
Zverev enjoyed a slightly more straightforward win, but admitted he is still having problems with his knee.
"Obviously my knee is still swollen but the pain is much less than it was a few days ago," he said.
"I hope when the swelling goes out it will be much better."