Second seed Andy Murray flirted with disaster before beating nemesis Marcos Baghdatis 7-6, 2-6, 6-4 in a cliffhanger to reach the last 16 of the Japan Open on Wednesday.
Briton Murray, fresh from winning his third title of the year in Bangkok, left it late to avoid a fourth defeat in five meetings against the Cypriot on his return to Tokyo.
Making his first appearance in Japan since 2006, Murray took the first set tiebreak 7-4 with a ferocious serve Baghdatis challenged in vain, the Scot marching off to his seat without bothering to look up at the slow-motion replay.
With the centre court roof closed because of heavy rain outside, Baghdatis caught fire in the second set, while Murray's temper looked like boiling over in the face of intense pressure.
Down 3-1 in the decider after another loose shot, Murray hit back for 3-3, letting out a roar after forcing Baghdatis to net a backhand and hauling himself back into the match.
Baghdatis, a former Australian Open runner-up, blinked first, saving one match point set up by an astonishing backhand lob from Murray.
It proved only a temporary stay of execution as Murray forced him into a wild backhand moments later to secure a place in the next round, where American Alex Bogomolov awaits.
Sixth seed Janko Tipsarevic, who won his first ATP Tour title by beating Baghdatis for the Malaysian Open title at the weekend, came down to earth with a bump.
The Serbian was upset 7-6, 6-7, 7-5 by Russia's Dmitry Tursunov in a marathon first round match which lasted a shade over three hours.
Matches on outside courts were suspended due to bad weather.