Paris - Roger Federer crashed to his earliest French Open defeat since 2004 on Sunday when he was bundled out in the last 16 by controversial Latvian Ernests Gulbis.
Gulbis won 6-7 (5/7), 7-6 (7/3), 6-2, 4-6, 6-3 to reach his first quarter-final at a major since he made the last-eight in Paris six years ago.
Federer, 32 years old and the 2009 champion, last failed to make the quarter-finals in 2004 when he was demolished in the third round by Gustavo Kuerten.
Victory on Sunday would have put the 17-time major winner into a record 42nd Grand Slam quarter-final.
But 25-year-old Gulbis, who had claimed on the eve of the match that he would not be intimidated by Federer's legendary status, showed no fear as he set up a last-eight clash against Czech sixth seed Tomas Berdych.
He unleashed 13 aces and 53 winners with Federer further undone by an uncharacteristic 59 unforced errors as he lost a five-setter in Paris for the first time.
"It's the biggest win of my career," said Gulbis.
"It was a tough match and I'm sorry as I know that most of you wanted Roger to win."
Gulbis, the 18th seed, was a break ahead in the first set at 4-2 before Federer retrieved it in the seventh game.
The Latvian was also a mini-break to the good in the tiebreaker but still could not convert.
After surrendering the advantage of an early break again in the second set, Gulbis was warned for breaking his racquet by stamping it into the Paris dirt.
However, his pressure on Federer eventually yielded rewards in the second set tiebreak and then in the third set through which he romped with breaks in the sixth and eighth games.
Federer wasn't finished as Gulbis, as so often in his colourful career, went spectacularly off the boil with the Swiss levelling the contest by taking the fourth set.
The Latvian incurred the wrath of the pro-Federer centre court crowd when he took a medical timeout to treat lower back pain at 2-5 down.
He thrived on the atmosphere, upping the pace and the seven-year age gap between the two men told on Federer who was quickly 3-0 down in the decider.
Gulbis set up two match points with his 13th ace and claimed his famous victory when Federer slapped a backhand wide.
It was a sobering loss for Federer whose last three appearances in Paris have resulted in steadily diminishing returns with a semi-final loss in 2012 followed by a quarter-final exit last year and then Sunday's fourth round exit.