Rafael Nadal saved match point in a pulsating final against Stefanos Tsitsipas to win his 12th Barcelona Open title.
Nadal had only lost one set in 11 previous finals in Catalonia and had never lost a clay-court final having held a match point.
He had two in the second set, but a combination of some uncharacteristic misses from the Spaniard and brilliant play from his opponent helped Tsitsipas turn the match around.
The Greek had his own chance to clinch back-to-back titles having won his maiden Masters crown in Monte-Carlo last week when he held match point at 5-4 in the decider.
Nadal dug deep, broke the Tsitsipas serve in the next game and battled his way to a 6-4 6-7 (6) 7-5 victory in three hours and 38 minutes.
Tsitsipas made a brilliant start to the match, striking winners apparently at will, breaking Nadal's serve and pushing for a second break.
The Spaniard, as he has done so many times before, weathered the storm. He won four games in-a-row from 2-4 to take the opening set and then again came from a break down in the second set after Tsitsipas had regrouped well.
That took him to the brink of victory on the court named after him, but Tsitsipas showed his own mettle to stay in the contest, recovering from 15-40 at 4-5 with two fine points.
A topsy-turvy tie-break saw Nadal lead 4-2 then save two set points from 4-6 only to serve a double fault at 6-6 that helped Tsitsipas clinch it.
The third was serve dominated until 4-5, when Nadal wobbled on his own delivery, but ultimately it was the Spaniard who proved just the tougher.
Meanwhile, world number one Ashleigh Barty beat Aryna Sabalenka in the final of the Stuttgart Open. The Australian fought back from a set down for the third time in as many matches in Germany to beat fifth seed Sabalenka 3-6 6-0 6-3.