Juan Carlos Ferrero won Spain a place in the semi-finals of the Davis Cup with victory over Germany's Andreas Beck in the deciding rubber in Marbella.
Ferrero was handed the task of winning the final reverse singles match in favour of Tommy Robredo and the veteran repaid captain Alberto Costa's faith with a 6-4 6-4 6-4 success.
The defending champions will again have home advantage in the semi-finals against surprise package Israel, who completed a 4-1 victory over Russia on Sunday.
The resurgent Ferrero was only called into the squad following his Wimbledon quarter-final defeat to Andy Murray, when David Ferrer pulled out with an injury.
Philipp Kohlschreiber earlier overcame a dramatic fightback from Fernando Verdasco to win 6-4 6-2 1-6 2-6 8-6 and level the tie.
The German dominated the first two sets before Verdasco turned the match on its head by taking the next two comfortably.
Kohlschreiber got a crucial break in the deciding set but the Spaniard saved a match point at 3-5 before breaking back, but the fightback was in vain as the German converted his second with a forehand winner down the line.

London calling Murray
ATP World Tour Finals Preview
Djokovic v Monfils
Monfils v Stepanek
Nadal v Tsonga
Djokovic v Soderling
Djokovic v Nadal
Clement v Djokovic
We take a closer look at the ATP World Tour Finals and give our verdict on the likely finalists in London.
Novak Djokovic is convinced his hard work will pay off during his World Tour Finals defence.
While Pac Man may have won big in Vegas, others in the world of sport didn't fair so well at the weekend.