Close, but Federer through
The second seed ended up clinching a 7-6 (10/8) 5-7 7-6 (7/2) 6-2 victory over the world number 45, but could easily have lost the first three sets.
He saved four set points in the first-set tie-break and another one midway through the third set, during which he really lost his way.