Spain will face France in the semifinals of the Davis Cup, their first in six years, after beating Germany on Sunday when they mounted an astonishing comeback.
Germany led the tie 2-1 after Saturday's doubles but world number one Rafael Nadal, playing his first event since retiring with a hip problem in the last eight of the Australian Open in January, levelled it up with a 6-1 6-4 6-4 victory over Alexander Zverev.
The clash lasted two hours and 20 minutes and was a show of dominance from the Mallorcan.
This left it down to the veteran David Ferrer, with Nadal as cheerleader courtside, to complete an unlikely revival, seeing off Philipp Kohlschreiber 7-6 (7-1) 3-6 7-6 (7-4) 4-6 7-5 in the deciding rubber in the Valencia bullring.
Ferrer's epic victory, in a game which lasted almost five hours, will go down in Spanish Davis Cup folklore. Having lost his first game to Zverev, he stepped up and showed great endurance and nous to see off his younger counterpart.
“It wouldn't have been an easy decision to put faith in me,” said Ferrer after the match, recognising that coach Sergi Bruguera could quite easily have opted for the in-form (and younger) Roberto Bautista.
“This is an unforgettable day; I don't know how I did it. This competition has been one of the toughest of my life,” added Ferrer who said it was “the best feeling” playing in front of “my people, my friends and my future wife”.
In the semifinals, Spain will take on France, on French soil, after they saw off Italy 3-1 in Genoa this week.
The matches will be played over the weekend of 14 to 16 September at a location yet to be decided.