World number two Roger Federer survived a gritty Andy Roddick fightback to beat the American 7-5, 6-7, 6-1 on Friday to advance to the semi-finals of the Madrid Open.
"I could, and should, have won in straight sets but that's what happens when you play Andy sometimes," Federer told a news conference.
"I thought it was a good match. Andy served very well and I came up with some nice points and those make me happy."
Third seed Novak Djokovic also stayed on course for a fifth straight final appearance with a 6-4, 6-4 win over Croatian wildcard Ivan Ljubicic.
Swiss maestro Federer mixed up his game beautifully against the big-serving Roddick in the first set and clinched it with an exquisite drop shot.
He had chances to break for a 5-4 lead in the second but sixth seed Roddick held on and stormed back from 3-0 down in the tiebreak, helped by one scorching forehand winner, to take the match to a deciding set.
Federer suddenly found a higher gear and three stunning passing shots set up a break in the second game.
EXTRAORDINARY SHOT
He played an extraordinary shot from the baseline between his legs with his back to the net to keep himself in one rally, saved a break point in game five and broke again the following game.
Roddick saved three match points before sending a return long on a Federer second serve to put the Swiss through to face the winner of the quarter-final later on Friday between fourth seed Andy Murray and fifth seed Juan Martin Del Potro.
Federer, who has yet to win a title this year, had never faced Roddick on clay before and improved his record against the American to 18 wins and two defeats going back to 2001.
Roddick, who has had six weeks off and got married in Texas last month, is not too downcast.
"There were some good things to take out of this," he said. "I've definitely felt worse going into the French Open before."
Djokovic got frustrated with himself at times against the 30-year-old Ljubicic but saved two break points in the second set and wrapped up victory on his first match point when the Croat went long with a return.
The Serb plays Rafael Nadal or the world number one's fellow Spaniard Fernando Verdasco, the seventh seed, in the last four.
Nadal is chasing a sixth title of the season and a fourth on clay.