David Ferrer needed seven championship points to defeat Alexandr Dolgopolov on Sunday and win the Swedish Open for a third time, securing his first ATP title since October 2015.
Dolgopolov appeared to be down and out when Ferrer took a 5-1 lead in the second set, but the world number 89, one of the most unpredictable players on the circuit, lived up to his reputation by producing a combination of clean winners and inch-perfect drop-shots to delay his demise.
Ferrer, though, ultimately prevailed when his opponent sent a forehand rally ball wide, sealing a 6-4 6-4 victory inside one hour and 27 minutes.
"Two years without winning a tournament, it's very special," he said.
"I'm really, really happy. It's not [been] an easy two years. I was so nervous.
"It's impossible to win easy in a final. Dolgopolov is a very good talent, very good power with his shots. He was close in the second set."
The Spaniard first won this event in 2007 and was a runner-up in 2011 before triumphing again a year later.
One of the ATP World Tour's elder statesmen at 35, Ferrer had 26 career titles to his name but finished 2016 empty handed and also had nothing to show for his efforts this season.
The eighth seed was not to be denied on clay in Bastad this weekend though, overcoming a bizarre incident in his semi-final win over Fernando Verdasco, when an intruder entered the court and shouted Nazi slogans in Swedish.
Ferrer looked set to face a tough battle a day later when he won a marathon second game to hold in the opening set, eventually securing the first break when a deep, top-spin heavy forehand prompted Dolgopolov to find the net.
Victory appeared to be a formality when two costly long backhands saw the mercurial Ukrainian give up breaks in the third and fifth games of the second set.
Dolgopolov unexpectedly fought back, significantly lifting his level of performance to break Ferrer for the first time in the match and then saved six championship points during a tense finale before finally succumbing to the persistence of the world number 46.