Defending Shanghai Masters champion Roger Federer avoided a third-round upset against Roberto Bautista Agut as he came through in three sets to clinch a quarter-final meeting with Kei Nishikori.
The Swiss, whose ranking as number two in the world is under threat this week, was broken three times in the second set to force a decider but eventually prevailed 6-3 2-6 6-4.
Bautista Agut had never even taken a set off Federer in their previous seven meetings but forced a decider only to be crucially broken at 4-4, and the Swiss served out to love to clinch the win.
Federer will now meet Nishikori, who he has not lost to since 2014, for the first time since the 2017 Australian Open.
Not quite# peRFect, but good enough. @rogerfederer's quest to defend his #RolexSHMasters title forges ahead with a hard-fought 6-3, 2-6, 6-4 win over @BautistaAgut . Gets No. 8 @keinishikori in tomorrow's quarterfinal! pic.twitter.com/2Cc6JV5YTt— RolexShMasters (@SH_RolexMasters) October 11, 2018
There were signs this was not going to be a straightforward evening for Federer early in the first set when Bautista Agut had a break point in the Swiss' second service game.
He could not capitalise, though, and Federer soon gained a 3-1 lead en route to taking the opener.
Federer won an 11-minute game at the start of the second set to break Bautista Agut again before the Spaniard instantly roared back and reeled off four games in a row.
Bautista Agut then forced a decider by breaking Federer for a third time, successfully winning a challenge to bring up set point, which he took when his opponent netted a backhand.
The third set remained on serve until, at 4-4, Federer claimed his first break since the start of the second set, and he capitalised to secure another hard-fought win having also beaten Daniil Medvedev in three sets on Wednesday.
"It was a very tough match, I thought it was a really high level," Federer said afterwards.
"They're tough conditions – the ball stays super low, it's fast, it's cooler.
"If you want to make the winner you have to take a lot of risks, it seems like. If you find a great groove, it's hard to go through the opponent."
|Brewers force game seven against Dodgers in NLCS|
|Guardiola admits Hart decision may have been a mistake|
|Vieira: Balotelli the same now as he was at 16|
|Butragueno backs under-fire Lopetegui|
|Liverpool´s defensive improvement has hurt attack – Klopp|
|Butler booed by Timberwolves fans during introductions|
|Pochettino: Dier´s Ramos tackle highlighted Spurs´ attitude|
|Man City working on new deal for Sane – Guardiola|
|Golden Knights sign RW Tuch to seven-year extension|
|Bryant explains how Lakers could beat Warriors|
|Finals hopefuls Isner, Fognini into Stockholm semis|
|Browns trade running back Hyde to Jaguars|
|Mourinho: I´d love to have Hazard at Manchester United|
|Hamilton´s title chances enhanced by Vettel´s grid penalty|
|Deja vu for Enisei as La Rochelle inflict another thrashing|
|Five-star Jovic makes Bundesliga history|
|Liverpool´s scoring slump no concern for cautious Klopp|
|He´s the Special One - Sarri insists he is not on Mourinho´s level yet|
|Second-half blitz guides Leicester to European success|
|Sheffield Wednesday 1 Middlesbrough 2: Besic, Assombalonga see off Owls|
|Goerges rallies to reach Luxembourg Open final, Jabeur makes history|
|Howe: Transfer speculation will not disrupt Ake|
|´Do we really want opera every night?´ - Klopp not changing Nations League view|
|Vile and abhorrent – Chelsea´s Carney responds to online abuse|
|Giants WR Beckham Jr. explains why he might cramp up: ´I really don´t like water´|
|Man City pay training-pitch tribute to Joe Hart|
|Neymar to be rested as Tuchel rubbishes Ballon d´Or concerns|
|Sarri ´not interested´ in Christensen father´s quit threat|
|Cardinals fire offensive coordinator McCoy after 1-6 start|
|Neymar return unlikely, but anything can happen – Valverde|
|Bairstow a doubt for fourth ODI|
|Manchester United fined for late arrival and delayed kick-off against Valencia|
|Australia-Pakistan chat not ´especially polite´ - Sarfraz|
|Pogba relishing ´pressure game´ against in-form Hazard|
|Don´t bet on Cardiff survival, warns Warnock|
|Buffon enjoying Tuchel´s methods at PSG|
|RIP to Wimbledon epics! Isner feels like The Undertaker following final-set tie-break rule|
|Sevilla performance sealed Bernat´s Bayern exit - Hoeness|
|Keita set to miss out as Liverpool monitor injured stars|
|He didn´t want to be here – Guardiola doubts Sancho will return to Manchester City|
|Sarri: Manchester United are the best in the Premier League|
|Mourinho salutes ´brave´ Shaw for ´best possible´ response to criticism|
|No Ballon d´Or distractions for Griezmann, insists Simeone|
|Wigan stand by Hardaker as full-back prepares to undergo rehabilitation|
|Barcelona deny Neymar talk|
|Hazard can win the Ballon d´Or as a Chelsea player, insists Sarri|
|De Bruyne in contention to start in Manchester City´s clash with Burnley|
|Neymar needs to mature to reach Messi levels - Xavi|
|We have a hell of a lot to do - Paine slams Australia batting|
|Kerber and Osaka to meet at WTA Finals|
|Lorenzo out of Japanese MotoGP|
|Real Madrid handed Africa trip in Copa del Rey|
|Allegri: Ronaldo has sharpened Juventus focus|
|No Wade in Wasps squad amid NFL reports|
|Rooney: Five of us controlled Man United dressing room|
|Bayern bosses launch scathing attack on ´disrespectful´ media|
|Saints lock in Lawes to new deal|
|Adelaide United 1 Sydney 1: Debutant Le Fondre rescues a point|
|Madrid can´t look back, only forward - Lopetegui confident of revival|
|Wimbledon to introduce final-set tie-breaks|
|Abbas inspires Pakistan to series victory|
|Madrid boss Lopetegui hopeful on Bale availability|
|Mood is positive at Bayern, insists under-pressure Kovac|
|LeBron offers food for thought after losing Lakers debut|
|Bolt future not an immediate concern for Mariners|
|Hazard: I could finish my career at Chelsea|
|Buffon hoping to avoid Champions League final against Juventus|
|Wilshere not ready for West Ham return|
|Chelsea v Manchester United: Hazard better under Sarri than he ever was with Mourinho|
|The big Friday Premier League quiz|