Shanghai (AFP) - Roger Federer admitted that he came "very close" to defeat as he was given a huge scare before seeing off Daniil Medvedev 6-4, 4-6, 6-4 to open his Shanghai Masters defence on Wednesday.
The 37-year-old Swiss top seed faces Spain's unseeded Roberto Bautista Agut on Thursday in the last 16 after what was an unconvincing start against the Russian.
The 20-time Grand Slam champion initially wasted little time stamping his mark on the tournament, breaking the 22nd-ranked Medvedev in the first game.
But Medvedev, 22, fresh from winning the Japan Open, broke back and enjoyed even more luck on Federer's serve in the second set to force a third.
In what was the first meeting between the pair, Federer broke in the ninth game of the decider to finally destroy Medvedev's resolve in just under two nail-biting hours.
"In the third set I really started to figure it out," said Federer, who was roared on by a band of fanatical fans decked out in red tops.
"How aggressive or how tactical I wanted to make the match, and by trying everything, I found a solution at the end."
Federer, who was uncharacteristically flustered at times, said he was pleased with his performance, but admitted it had been a nervy one.
"Of course I feel pressure from the tournament organisers, the fans, my team, myself, because I know that sometimes coming through a tough first round can be the key to what's to come afterwards," said the 2017 champion.
"Today was very close to maybe not getting that next step."
- Del Potro virus -
With the exception of injured world number one Rafael Nadal, Federer's chief rivals are all still in the mix.
Del Potro, the third seed, said that he is suffering from a virus and reviewing his health "hour by hour", after labouring past France's Richard Gasquet.
The Argentine lost Sunday's final of the China Open in Beijing to unseeded Nikoloz Basilashvili and afterwards revealed that he had been unwell.
Three days on and the 30-year-old continues to be under the weather, but just about did enough to see off Gasquet 7-5, 7-6 (9/7).
Between coughs at his post-match press conference, Del Potro said: "It wasn't easy to play for me today, I did what I can. I didn't run too much.
"But I'm going like hour by hour and see how I'm feeling," added Del Potro, who plays 13th seed Borna Coric of Croatia next in Shanghai.
"I got lucky that I won, but tomorrow will be a different day.
"If I have a good night today and I have a good recovery tomorrow morning, maybe I will feel a little bit better for tomorrow night and play better than today."
The 21-year-old Zverev fought off a cold -- he has had a sore throat and blocked nose for a few days -- and the raw power of Basilashvili, winning 7-5, 6-4.
The fourth seed will play Australia's world-ranked 33 Alex de Minaur.
Zverev said that Basilashvili, who is up to a career-high ranking of 23, "knows how to play, definitely".
"Probably the hardest-hitting player I have ever played against," said Zverev.