Roger Federer opened the defence of his Shanghai Masters title with an absorbing three-set victory against an in-form Daniil Medvedev.
The world No 2, playing his first competitive match since his surprise US Open fourth-round exit, found some of his best tennis in the latter stages in a 6-4 4-6 6-4 win against the Japan Open champion.
Two-time champion Federer will next face Roberto Bautista Agut, after the unseeded Spaniard beat Mackenzie McDonald 3-6 6-4 6-1.
Federer began strongly to break the Russian in the opening game of the match but was quickly broken back by the world No 22 as both players searched for their best tennis.
With the first set well balanced at 4-4, Federer took advantage of a drop in focus from Medvedev to claim a second break of serve before the 20-time Grand Slam champion held serve to secure the initiative.
Medvedev saved an early break point before a backspin drop-shot-volley winner in the fifth game caught Federer by surprise as the Russian grew in confidence.
He produced impressive baseline hitting to trouble Federer and was rewarded when he converted his first break point of the set to force a decider.
Both players saved a break point in a high-level opening to the third set but Federer finally secured the crucial breakthrough before an ace completed a hard-fought victory.
Kei Nishikori fell a set behind against 18-year-old Chinese wildcard Wu Yibing before winning 12 of the last 15 games to progress in their second-round meeting.
The eighth seed will now face big-serving American Sam Querrey after he outlasted countryman Taylor Fritz 6-3 6-7 (4-7) 7-5.
Marco Cecchinato recovered from a set down to defeat Hyeon Chung 4-6 7-6 (7-5) 7-6 (7-5) and set up a French Open quarter-final rematch with three-time champion Novak Djokovic.
The Italian had never previously won back-to-back main draw matches on a hard court.
Watch live continued coverage of the Shanghai Masters on Sky Sports Action from Thursday at 06.00 am, with British No 1 Kyle Edmund in action.
We have every major tennis event covered from all angles via our website skysports.com/tennis. On the move? Head to our app for mobile devices and iPad, or follow our Twitter account @SkySportsTennis to join in the conversation.
We will also have coverage of the ATP Finals in November with every match live on Sky Sports.