Roger Federer was forced to three sets by Thomaz Bellucci in the third round of the Indian Wells Open, but managed to claim a 3-6 6-3 6-4 victory.
The former world number one struggled in the early stages of the clash, with his Brazilian opponent dominating the first set and snatching the lead in California.
Despite the early blow, Federer composed himself and came into his stride to draw level by taking 6-3 in the second set.
Federer continued to control the match after an early blip and grabbed a 5-4 lead on his service game before clinching his second match point courtesy of a forehand error from Bellucci.
Federer will go head to head with Juan Martin del Potro in the quarter-finals.