Almagro got past John Isner 6-4, 4-6, 6-4, 4-6, 7-5 after David Ferrer stopped Sam Querrey 4-6, 6-2, 6-2, 6-4.
That puts Spain one win away from a fourth David Cup final appearance in the last five years. The Spaniards won the Davis Cup in 2008, '09 and '11. Spain also won in 2000 and 2004.
A victory in Saturday's double match, in which Marcel Granollers and Marc Lopez take on world No. 1s Bob and Mike Bryan, or in either of Sunday's reverse singles will allow Spain to advance. The winner of the Spain-United States semifinals moves into the Davis Cup finals Nov. 16-18 against either Argentina or the Czech Republic, which split their two matches Friday.
Querrey rallied to take the first set with a pair of late breaks but he didn't record another break as Ferrer played a solid match to give Spain the early advantage.
The Almagro-Isner match was closer throughout, with one break deciding each of the first four sets. Almagro fought off three break points to hold at 3-2 of the fifth set later and pushed Isner into three match points in the 10th game.
Isner, who had 24 aces, served his way out of that problem but twice made unforced errors that put Almagro at match point No. 4 in the 12th game. An Isner return that landed long ended the match. It was his 95th unforced error of the 4-hour, 16-minute match.
Top 10-ranked players Isner and Ferrer are to go against each other in Sunday's first singles match while Almagro is scheduled against Querrey in the fifth match of the series.
Celebrity Families of 2014 [PHOTOS]