Rafael Nadal came within a whisker of making an opening-round exit at the China Open on Tuesday as he was pushed to three sets by Frenchman Lucas Pouille before winning 4-6, 7-6(6), 7-5.
The world number one, who was beaten by Pouille the last time they met at the 2016 US Open, lost a close first set before saving two match points in a second-set tiebreak to level things up.
Nadal needed all his experience to keep Pouille at bay in the decider and the match looked to be heading for another tiebreak before he pounced to break Pouille's serve for the first time to go 6-5 up in the third.
The Spaniard held his nerve to close out the match in clinical fashion after two hours and 31 minutes.
Earlier on Tuesday, Juan Martin del Potro stormed into round two with a comprehensive 7-6(4), 6-4 win over Uruguay's Pablo Cuevas and will face third seed Grigor Dimitrov, who battled past Bosnian Damir Dzumhur 6-1, 3-6, 6-3.
Eighth seed Nick Kyrgios breezed past Nikoloz Basilashvili 6-1, 6-2, the Australian serving 12 aces as he closed out the contest in under an hour.
John Isner, the number six seed, also pulled off a routine 6-2, 6-3 victory over Tunisian qualifier Malek Jaziri, although two of the American's unseeded compatriots bowed out.
Jared Donaldson fought hard against seventh seed Tomas Berdych, but ran out of steam in the decider as he went down 6-3, 0-6, 6-2.
Jack Sock was the other American eliminated and the 25-year-old will be disappointed he could not hold off Andrey Rublev despite comfortably winning the first set against the Russian.
Rublev bounced back to win 3-6, 6-1, 6-2 and will face Berdych next.
Halep sets up Sharapova rematch in Beijing
World number two Simona Halep set up a mouth-watering third- round clash with Maria Sharapova at the China Open after the Romanian's opponent Magdalena Rybarikova retired due to illness trailing 6-1 , 2-1 on Tuesday.
Halep survived a break point in the opening game before powering her way to a 5-0 lead with two breaks of her own as Rybarikova struggled on serve and committed 19 unforced errors en route to conceding the first set.
The 28-year-old Slovakian conceded the match early in the second set after a medical timeout, giving Halep an opportunity to avenge her U.S. Open first-round defeat by Sharapova.
The Russian, who has never lost to Halep in seven previous meetings, beat compatriot Ekaterina Makarova 6-4, 4-6, 6-1 to record a second consecutive three-set victory in Beijing earlier on Tuesday.
"You can take a little bit away from all the matches we've played in the past," Sharapova said.
"We know each other's games very well. They've always been very challenging, tough, competitive, emotional."
"I love the challenge of playing against someone that's number two in the world. She's a great player. She's had a great year."
Twice Grand Slam champion Petra Kvitova dominated American qualifier Varvara Lepchenko in a battle of left-handers, the Czech winning 88 percent of points on serve to progress to the third round with a routine 6-4, 6-4 victory.
Kvitova faces fifth seed Carolina Wozniacki next, in what promises to add another intriguing chapter to their eight-year rivalry.
Number 12 seed Kvitova holds a 6-5 lead in her head-to-head record with Wozniacki, having won their last two matches in straight sets.
Fourth seed Karolina Pliskova hit nine aces as she edged out German qualifier Andrea Petkovic 6-4, 6-4 to set up a clash with Sorana Cirstea of Romania.
American CoCo Vandeweghe was forced to retire early in the second set against Daria Gavrilova, sending the Australian through to face Czech Barbora Strycova, while China's Duan Ying-ying lost to Russia's Elena Vesnina.