Roger Federer saved two match points before claiming a hard-fought victory over Gael Monfils to reach the Madrid Open quarter-finals.
The Swiss fourth seed came from a break down in the deciding set to beat the Frenchman 6-0 4-6 7-6 (7-3).
Federer will face fifth seed Dominic Thiem – who he lost the Indian Wells final to in March – in the semi-finals.
“Instead of seeing a things bit more cloudy and rainy, you see it more on the sunny side,” Federer said.
“You don’t win matches every day saving match points and it makes you feel good, but it is more relief I feel right now.”
The victory was Federer’s 1,200th career win and secured his place in a first clay-court quarter-final since the French Open in 2015.
Earlier, world number one Novak Djokovic breezed past France’s Jeremy Chardy 6-1 7-6 (7-2).
Rafael Nadal continued his pursuit of a sixth title by beating American Frances Tiafoe 6-3 6-4.