Stepanek celebrated the victory with a 'caterpillar'
World number one Roger Federer bowed out of the Rome Masters as he suffered a surprise quarter-final defeat at the hands of Radek Stepanek.
Federer lost 7-6 (7-4) 7-6 (9-7), his sixth defeat of an inconsistent season.
Third seed Novak Djokovic made it to the semi-finals after his Spanish opponent Nicolas Almagro retired with a wrist problem.
Stanislas Wawrinka beat James Blake to reach his first Masters semi-final,
where he will play Andy Roddick.
Wawrinka followed up wins over Andy Murray and Juan Carlos Ferrero with a 6-7 (5-7) 7-6 (7-5) 6-1 defeat of Blake.
The Swiss number two, who made the last four in Barcelona last week, will face Roddick after the American beat Tommy Robredo 6-3 4-6 7-6 (7-4).
"I'm playing OK and right now I feel like everything else is kind of a bonus as far as this week goes," said Roddick.
I played so poorly on the big points
"I probably would have taken a semi before the week started. I'm just going to go out and leave it there and have fun."
Australian Open champion Djokovic cantered through the first set 6-1 against Almagro and broke the Spaniard in the first game of the second, prompting him to throw in the towel.
But the main focus of attention was on the latest defeat for Federer, who had won four of his previous five meetings with Stepanek.
With the French Open two weeks away, the defeat is a blow to Federer's hopes of claiming the only Grand Slam title to elude him.
After the first set had gone with serve, Stepanek took control of the tie-break with a volley to go up 6-4, then served an ace on his first set point.
Federer squandered a 4-1 lead in the second-set tie-break, and Stepanek converted his second match point with a first serve that Federer could not get back.
At one point in the first set, Federer won four straight service games without losing a point but Stepanek kept himself in the match with his fearsome serve and volley tactics.
"Usually when I have a lead I don't let it go, so it's quite disappointing," said Federer.
"I played so poorly on the big points.
"He's difficult to play. He's always changing his game up a lot. But I've played him in the past, so it wasn't a surprise. I just wish I played better."
Stepanek said: "He definitely doesn't have the results he was used to in previous years, but the other players are getting better.
"I came to the match with the belief that I can win."
The defeat has robbed Federer of the chance of some valuable match practice, with the French Open getting under way at Roland Garros on 25 May.
It comes just two days after the defending champion Rafael Nadal, who has the upper hand against Federer on clay, was beaten by Juan Carlos Ferrero.