Roger Federer returns to Ernests Gulbis. (Yoan Valat / EPA)

For the first time in nine years, Roger Federer failed to advance to the quarterfinals of the French Open, falling to Ernests Gulbis in five sets at Roland Garros.

Gulbis, the 18th seed from Latvia, won 6-7 (5-7), 7-6 (7-3), 6-2, 4-6, 6-3 and came into the match relaxed and undaunted despite Federer’s 2-1 lead in their head-to-head matches. Federer, the fourth seed, has missed three of the last four Grand Slam quarterfinal rounds — after a streak in which he made 36 in a row. (He was an Australian Open semifinalist in January.) The upset was more mild than shocking, given that Federer is 32 and that clay is not his surface, but the crowd was firmly on his side, as Gulbis noted.

“I’m sorry I had to win,” he told the crowd. “I know all of you like Roger.”

Ernests Gulbis’s upset was on the mild end of the spectrum, given Federer’s age. (Pascal Guyot / AFP / Getty Images)

His apology aside, winning was his plan from the start.

“I’m not scared of that match at all,” Gulbis said beforehand. “I’m really confident.”