World number one Roger Federer came from a break down in the deciding set to beat David Nalbandian 6-3, 3-6, 7-6 and reach the Rome Masters final on Saturday.
It was the world number one's second close brush with defeat in as many days following his quarter-final against Spanish qualifier Nicolas Almagro, which he edged 7-5 in the third set.
Federer has failed to win the claycourt tournament in five previous visits and will have to raise his game in the final, where his opponent is likely to be defending champion Rafael Nadal.
Unbeaten in his last 51 matches on clay, the Spaniard was playing Frenchman Gael Monfils in the later semi-final.
Nalbandian promised to be a tough opponent, having beaten Federer six times in their previous 10 meetings including in the season-ending Masters Cup final last year.
The first four games all went against serve. Federer broke in the eighth game and then held serve to take the first set.
Instead of settling into his game, however, the Swiss hit a series of unforced errors to allow Nalbandian to go 3-1 up in the second set and serve out to level the match.
Federer started the decider in the worst possible way, losing his serve and flinging his racquet down in disgust at the changeover.
He hit back in the fourth game, which he snatched on his third break point, when Nalbandian drifted a forehand over the baseline.
Another break put Federer 4-2 up. He then had three points to take a 5-2 lead, but Nalbandian rallied to break back and level the set.
In the tiebreak, a netted backhand by Nalbandian and a winning service return by Federer gave the Swiss two matchpoints. He converted the second when Nalbandian put a forehand long.
Federer reached the Rome final in 2003 but lost to Felix Mantilla.
More from rediff