Roger Federer has made it through to the quarter-finals of the Swiss Indoors in Basel with a three-set victory over world number 34 Thomaz Bellucci.
The world number one broke early in the opening set but had to stave off two break points to see it out 6-3.
Both men continued to hold serve in the second and it was Brazilian Bellucci who seized the initiative in the tie-break as he raced into a 6-2 lead.
With the home crowd firmly on his side, Federer managed to claw it back to 6-6, but Bellucci eventually scraped through 8-6 to force a third set.
The match looked as if it was going into another tie-break with both players failing to drop a service game, only for Federer to break Bellucci at the last opportunity and see out the match 7-5.
The five-time winner of the tournament will now meet either Lukasz Kublot or Benoit Paire for a place in the semi-finals.