Defending champion Roger Federer survived a three-set battle against Spaniard Roberto Bautista Agut to enter the Shanghai Masters quarters at Shanghai on Thursday.
Federer took one hour and 54 minutes to beat 28th-ranked Bautista Agut 6-3, 2-6, 6-4. The top seed will play Japan's eighth seed Kei Nishikori. Other title contenders Novak Djokovic and Alexander Zverev are also through, albeit with far less hassle.
After the match, Federer said that he did not want to lose in front of his young family as he was pushed all the way for the second match in a row.
The 37-year-old Swiss great was forced to fight in his opening match on Wednesday against Russia's Daniil Medvedev.
Normal order appeared to have been restored when the 20-time Grand Slam champion comfortably claimed the first set against Bautista Agut.
But the Spaniard earned a piece of personal history after that, winning the second set – the first time he had taken a set against the Swiss maestro.
The 30-year-old Bautista Agut had the whiff of an upset in his nostrils and the prospect of a first victory over the Swiss at the eighth attempt.
But in the ninth game of the deciding set, Federer made the breakthrough on his opponent's serve, pumping his fist as another hard-won victory loomed into view.
Federer's wife Mirka and their four children were in the arena and he said afterwards: "I'm not sure if they give me more courage fighting on the court, but they were here today.
"I was telling myself, particularly tonight I cannot do this (lose) because they were there, but I don't know how much I draw from that, quite honestly," Federer said that two stern encounters had set him up nicely for Nishikori on Friday.
"I hope it's going to help me that I played against Medvedev and also Bautista Agut, two really good baseliners.
"From that standpoint, I feel like I found a rhythm."
Delpo injury woe
One player who will not be in the quarter-finals is Juan Martin del Potro after he hobbled out of the tournament.
The Argentine world number four, who had already been suffering from a virus, lost his footing at 5-5 in the first set against Croatia's Borna Coric.
The 30-year-old Del Potro had lengthy treatment and strapping put on his knee but conceded the match after losing the first set 7-5.
Coric, the 13th seed, faces Australia's unseeded Matthew Ebden next Second seed Djokovic enjoyed a measure of revenge as he booked his spot in the quarter-finals with a 6-4, 6-0 demolition of Marco Cecchinato.
The Serbian was stunned by the Italian – ranked 72 in the world at the time – in the French Open quarter-finals earlier this year.
It was part of a wretched run of form Djokovic suffered after elbow surgery in February.
But he exploded back to life mid-season, winning Wimbledon, the Cincinnati Masters and US Open.
The 31-year-old says he is back close to the kind of blistering form that has brought him 14 Grand Slams.
(With AFP inputs)