Roger Federer crashed out of the French Open after a shock defeat to Latvian Ernests Gilbis in five sets at Roland Garros.

Gulbis won 6-7 7-6 6-2 4-6 6-3 to set up a quarter final meeting with Tomas Berdych.

Federer looked on course for the last eight in Paris for a 10th successive year when serving for a two-set lead but Gulbis broke the 17-time grand slam champion before levelling the match on a tie-break.

The world No.17 then took the third set after clinch two breaks over Federer but the Swiss came back in the fourth set amid a substandard display.

However, the match appeared to turn on a medical timeout in the fourth set when with Federer seving to square the match at 5-2 up, Gulbis left the court to be treated for a back injury.

When he returned, he broke Federer straight away and though the 2009 champion did take the set eventually, Gulbis won the first three games of the deciding fifth to help clinch the biggest victory of his career.