World number one Roger Federer was forced to fight for his place in the third round of the Japan Open before clinching a 7-6 (7/2) 7-6 (7/3) victory over Viktor Troicki.
Federer played within himself in his first ever match in Japan but ripped through the first-set tie-break for the loss of just two points against the hard-serving Troicki.
The 276th-ranked Troicki continued to prove a tough opponent in the second set until Federer's superior class eventually showed through to give him the match-winning edge in another tie-break.
A fabulous cross-court forehand gave Federer a 6-2 lead before the US Open champion closed out proceedings with a fierce serve on his second match-point.
'I made it hard on myself,' said Federer. 'Thank God I have the ability to play well when I really need it. It was a tough match and I'm really happy I came through.
'It was my first match and I wanted to play it safe a bit. I didn't want to take too many risks. I wanted to get a rhythm for myself.'
Federer will face defending champion Wesley Moodie in the next round after the 13th seeded South African beat Austrian Stefan Koubek 6-3 6-4 earlier on Wednesday.
Second seed Tommy Robredo cruised to a comfortable 6-4 6-1 victory over Yen-Hsun Lu of Taiwan for an 11th victory in his last 14 matches, while 19-year-old fourth seed Andy Murray lost 6-3 7-6 (7/1) to Jiri Novak.
Novak claimed a comfortable first set win before Murray responded to force a second set tie-break after fighting back from 4-1 down, but the Czech eventually won the set in a one-sided tiebreak to set up a fourth round match with fourteenth seed Benjamin Becker, who beat Danai Udomchoke 6-2 6-1.
'Every single young player goes through a patch where he's not playing well. You can't expect to get to the semi-finals every week - unless you're Roger Federer or Rafael Nadal. I did well to fight back into the match but unfortunately I couldn't quite turn it around,' said Murray.
Eighth seed Paradorn Srichaphan lost to wildcard home favourite Takao Suzuki 7-6 (7/4) 6-7 (5/7) 6-4, who will face Alexander Waske, who beat 11th seed Bjorn Phau 6-4 6-4, in the next round.
Jarkko Nieminen and Dmitry Tursunov also booked their places in the third round despite being stretched by their unseeded opponents.
Fifth seed Nieminen beat Lars Burgsmuller in straight sets to make it two career wins out of two over his German opponent.
The Finn, who captured his maiden ATP title in Auckland in January, held out for a 7-5 7-6 (7/2) victory and will meet Juan Monaco, who beat fellow Argentinian Edgardo Massa 7-6 (7/4) 6-3, in the next round.
Sixth seed Tursunov battled past Yeu-Tzuoo Wang 6-3 5-7 7-5, while USA's Vincent Spadea and Germany's Rainer Schuettler ensured passages into the fourth round with wins over Satoshi Iwabuchi and 16th seed Paul Goldstein respectively.