Roger Federer stuttered into the quarter-finals of his hometown tournament in Basel on Thursday after an unexpectedly tough 7-6, 7-6 second round win over Finland's Jarkko Nieminen.
Nieminen, the world number 29, came into the match having lost all nine of his previous meetings with Federer and without having taken a set off the Swiss.
He came agonisingly close to breaking that hoodoo on Thursday, however, fighting back from 3-1 down to lead 5-3 in the opening set.
Federer, looking strangely out of sorts throughout the match, even handed his opponent two set points but they proved to be the last with the world number two pulling himself back from the brink with an ace and a forehand winner.
He promptly broke back to level as Nieminen served for the set before squeezing through the subsequent tiebreak 8-6.
Federer seemed back in control after breaking 3-2 ahead in the second set but slipped up again three games later to send the encounter into another tiebreak.
This time though he made no mistakes, winning six points in a row to clinch the tiebreak 7-1.
"I think the great record I have against him definitely helped me when it came to the big points," said a relieved looking Federer.
"He played extremely well at the start of the match and I was having to hope he would make some mistakes which is never a nice position for me to be in."
Federer will now face unseeded Italian Simone Bolelli in the quarter-finals, after the world number 42 won his second round match against Spain's Marcel Granollers 6-4, 6-2.
Federer's eventual victory completed a successful day for the tournament's top players with Argentine second and third seeds David Nalbandian and Juan Martin Del Potro and American fourth seed James Blake also booking quarter-final places.
Nalbandian had to work even harder than Federer, going to a third set tiebreak against Belgian qualifier Kristof Vliegen before winning 6-4, 5-7, 7-6.
Like Federer, Nalbandian also managed to up his game when it mattered, securing the decisive match point in the tiebreak after chasing down a shot off the net cord and lunging fast to put away Vliegen's close-range reply.
A more typical booming groundstroke by the Argentine then forced Vliegen to put the ball long and hand Nalbandian victory. He now meets German qualifier Benjamin Becker in the last eight.
Nalbandian's Davis Cup team mate Del Potro maintained hopes of a semi-final meeting between the pair when he wrapped up a routine 6-3, 6-3 win over local wild card Stephane Bohli.
Del Potro will now have to beat Russian sixth seed Igor Andreev to set up a possible last four meeting with Nalbandian.
Blake overcame some stiff early resistance from Spain's Oscar Hernandez to win his second round match 6-7, 6-2 6-4.
Hernandez never came close to breaking the world number 11 but successfully defended three break points against his own serve before clinching the tiebreak 7-4.
Blake was less forgiving in the next two sets, breaking Hernandez twice, before wrapping up the win with a further break in the third.
"Luckily, I was serving very well today which got me out of trouble," said Blake, who also had to come from behind to win his first round match against Germany's Nicolas Kiefer.
"I like the fact that I've closed out the last two matches pretty handily on the final service games which shows when you do that you're not thinking about nerves or letting things creep into your mind."
Blake will next face another Spaniard, Feliciano Lopez, in the quarter-finals with the winner going on to a likely meeting with Federer -- assuming the defending champion avoids any further wobbles against Bolelli on Friday.