Australia will play reigning champions Italy or Argentina in the Davis Cup semi-finals after defeating the United States in a doubles decider.
In a meeting between the two most successful nations in the tournament's history, world number four Taylor Fritz kept the USA in contention by beating Alex de Minaur, after Ben Shelton lost to Thanasi Kokkinakis.
But Matthew Ebden and Jordan Thompson sent Australia, runners-up in the past two editions, through to the last four with a straight-set win over Shelton and Tommy Paul.
Italy, led by world number one Jannik Sinner, face Argentina later on Thursday, with Germany set to take on the Netherlands in the other semi-final.
In a thrilling opening contest, Kokkinakis saved four match points to edge a 30-point third-set tie-break against Shelton, putting Australia ahead with a 6-1 4-6 7-6 (16-14) victory after two hours and 17 minutes in Malaga.
Fritz, who rose into the world's top four after finishing runner-up to Jannik Sinner at last week's ATP Finals, responded with a clinical 6-3 6-4 win against the ninth-ranked De Minaur to force a decider.
However, Ebden and Thompson proved too strong for Paul and Shelton in the doubles match and completed an efficient 6-4 6-4 win with a break of serve in both sets.