Roger Federer will face Denis Kudla in the Gerry Weber Open semi-finals after the world number one battled through another tough test in Halle.
Swiss great Federer saved two match points against Benoit Paire on Thursday and he was again pushed 24 hours later when he faced Matthew Ebden.
The 20-time grand slam winner required a tie-break in the first set and took his time to shake off Ebden in the second, progressing 7-6 (7-2) 7-5.
"It was a tough job, because Matthew played very well. I had to fight a lot, find my rhythm and did not get into the game well," Federer said.
"But I'm glad that I played a very good tie-break. In the second set, it went a bit back and forth and sometimes it was frustrating. You have to react well and I think I did well in the end."
Federer must win the title in Halle for a 10th time to retain his place at the top of the rankings and Kudla is up next in the last four.
The American was another straight-sets winner, dispatching of Yuichi Sugita – who had knocked out French Open finalist Dominic Thiem in round two – 6-2 7-5.
On the other side of the draw, fourth seed Roberto Bautista-Agut was tested by a determined Karen Khachanov en route to a 6-3 6-7 (3-7) 6-3 triumph.
Borna Coric will be the Spaniard's opponent in the semis after the Croat defeated Andreas Seppi.