Rafael Nadal was denied a fairytale return to the game by Horacio Zeballos who stunned him in the Vina del Mar final in Chile.
Zeballos, the world No 73 and playing in just his second ATP Tour final, rallied to beat the former world No 1 6-7 (2-7) 7-6 (8-6) 6-4.
The Argentine became just the third player - along with Novak Djokovic and Roger Federer - to beat Nadal in a clay court final.
Nadal was playing his first tournament in seven months because of injury, and he was delighted with how it went, despite losing Sunday's showpiece.
"It was a great tournament for me," Nadal said. "If we take everything, it was positive. It's true I wanted to win the final but it wasn't possible. He made things better than me and I didn't play my best match."
"It was a week when we didn't know how the body would respond, the knee. At least we have seen we can compete up to a certain level. It's true I have had good days and bad days that impact on my play."