Spain beat Germany to reach the Davis Cup semi-finals after Rafael Nadal and David Ferrer won both singles matches on Sunday.
Germany led 2-1 after Saturday’s doubles but world number one Nadal levelled the tie with a 6-1 6-4 6-4 victory over Alexander Zverev.
Ferrer beat Philipp Kohlschreiber 7-6 (7-1) 3-6 7-6 (7-4) 4-6 7-5 in the deciding rubber in Valencia.
Holders France will host Spain in the final four after beating Italy.
Croatia will take on the United States in the other semi-final, with both ties to be played from September 14-16.
Nadal was playing his first event back since retiring with a hip problem in the last eight of the Australian Open in January.