World number one Novak Djokovic was beaten in the Qatar Open semi-finals by Spaniard Roberto Bautista Agut in Doha.
The Wimbledon champion, twice a winner of the event, lost 3-6 7-6 (8-6) 6-4.
Bautista Agut, ranked 24, took the second-set tie-break on his fifth set point and then broke in the opening game of the decider, eventually sealing victory in two hours and 35 minutes.
In Saturday's final he faces either wildcard Tomas Berdych, 33, now ranked 71, or 20th-ranked Marco Cecchinato.
It was only the second victory in nine matches against Djokovic for 30-year-old Bautista Agut, who has never progressed beyond the fourth round of a Grand Slam.