Ash Barty flirted repeatedly with danger on the indoor Stuttgart clay before pulling out a nail-biting 2-6, 6-1, 7-5 comeback over Karolina Pliskova to reach the semi-finals.
The debut week looked like being over early as the Australian came within two points of defeat on five occasions.
But the world No. 1 showed her class with a great escape after two hours, finishing with seven aces and five breaks of serve against the Czech sixth seed.
“It was probably a match of two sets,” the relieved winner said. “In the first I wasn’t able to build any pressure, she had freedom on my service games.
“But flipping the switch right from the first game of the second set was important.
“To then make it more of a physical match was what we were after, and over time we were able to get the match back on my terms as much as we expected.”
Barty will play her Saturday semi-final against fourth seed Elina Svitolina, who put out in another thriller, 6-7(4), 7-5, 6-2.