Rafael Nadal overcame a stubborn Marcos Baghdatis in Stuttgart as he attempts to get his season back on track.
The 29-year-old Spaniard, down to 10th in the world rankings, beat the Cypriot 7-6 (7-5) 6-7 (4-7) 6-2 to reach the Mercedes Cup quarter-finals.
Nadal, who lost to Novak Djokovic in the French Open quarter-finals last week, took charge in the third set.
He will next face Australian fifth seed Bernard Tomic, who overpowered Tommy Haas 7-6 (8-6) 6-2.
Nadal, at his lowest ranking since he was 11th as a teenager 10 years ago, faced solid resistance from Baghdatis and dipped to a 59% first serve in the second set.