World number one Rafa Nadal will face Frenchman Gael Monfils in the final of the Qatar Open after surviving a tough test against German qualifier Peter Gojowczyk in Doha.
The Spaniard, warming up for this month's Australian Open which he missed last year because of illness, dropped the opening set against the world number 162, before raising his game sufficiently to battle through 4-6, 6-2, 6-3 on Friday.
Monfils beat another German, Florian Mayer, 6-3, 6-2 in the other semi final.
Top seed Nadal was far from his best but said he was pleased with the way he responded to falling behind against a player enjoying the best week of his career.
"The positive thing is I am in the finals the first week of the season without arriving here with big preparation," Nadal was quoted as saying on the ATP Tour website.
"Without playing my best, I was able to find a solution. It's true that I finished the match playing better than what I started. That's always a positive thing."
Gojowczyk, 24, won the first nine points of the match and held his nerve to claim the opening set.
Nadal responded to open a 4-0 lead in the second set but his opponent refused to fade away and briefly threatened at the start of the decider before succumbing.
Injury-plagued Monfils, who has not won a title since 2011, has lost eight of his 10 matches against Nadal but will feel confident after a commanding performance against Mayer.
The 2012 Doha runner-up needed only 55 minutes to win his semi-final, sending down nine aces.