Novak Djokovic suffered his first defeat of the new season in the Qatar Open semi-finals on Friday, losing in three sets to Spain's Roberto Bautista Agut.
World number one Djokovic, who was pushed to the limit in his last two matches in Doha by Marton Fucsovics and Nikoloz Basilashvili, failed to find a way past a determined Bautista Agut who won 3-6 7-6(6) 6-4 in two hours and 35 minutes.
The 30-year-old Spaniard will face Tomas Berdych in the title clash after the Czech beat fourth-seeded Italian Marco Cecchinato 7-6(6) 6-3 in the other semi-final.
"I will remember this match all my life," said world number 24 Bautista Agut, whose victory over Djokovic slightly improved his win-loss record against the Serb to 2-7.
"It was an unbelievable atmosphere. I work every day to play this tennis. I know it's difficult to play at this level. That's why Novak is number one in the world. But I cannot be more happy than I am now."
Defeat meant Djokovic, who won Wimbledon and the U.S. Open last year in a spectacular return to form after elbow surgery, missed the chance to reach his sixth straight final.
The Serb cruised through the opening set before Bautista Agut dragged the contest into a decider by edging the tiebreak in the second set.
With the momentum swinging his way, Bautista Agut secured an early break in the final set before closing out the match.
"I wanted to give everything I had and fight until the last point," added Bautista Agut, who will look to win his ninth ATP title in Saturday's final.
"Finally I could turn the second set. Novak was up and it was tough. He was solid and I had to play good tennis. I had to play a lot of lines and serve well."