Rafael Nadal overcame Bernard Tomic 6-4 6-7 (6-8) 6-3 to reach the semi-finals of the Mercedes Cup in Stuttgart.
The 29-year-old Spaniard lost the second set after holding a match point but eventually overcame the stubborn Australian in two hours and 19 minutes.
Tomic, 21, only managed to take one of nine break point chances against the 14-time Grand Slam champion.
Nadal, down to 10th in the world rankings, will face France's Gael Monfils in the last four on Saturday.
He is currently at his lowest ranking since he was 11th as a teenager 10 years ago.