Dominika Cibulkova and Daniela Hantuchova won their reverse singles matches to earn Slovakia a place in the Fed Cup World Group after building an insurmountable 3-1 lead over Spain on Sunday.
Cibulkova won her second singles match of the playoff series by beating Silvia Soler-Espinosa in straight sets, while Hantuchova had to rally from a set down to defeat Lourdes Dominguez-Lino 0-6, 7-6 (4), 6-4.
Spain's Arantxa Parra-Santonja and Nuria Llagostera won the remaining doubles rubber, downing Magdalena Rybarikova and Anna Schmiedlova 6-0, 6 (7)-7, 6-3, to make it 3-2 for Slovakia.
The 17th-ranked Cibulkova used her powerful forehand to break Spain's No. 1 six times en route to winning 6-4, 6-4.
Cibulkova slapped Soler-Espinosa's serve across the court for her 27th winner of the match to claim victory on the red-clay court in one hour and 51 minutes.
"It wasn't easy today, it was an especially tough match," Cibulkova said. "She was playing aggressively and serving well. But I showed that I am better maybe mentally.
"I was just going for it and I was confident, and that was the key to winning."
The 22-year-old Slovak player also beat Dominguez-Lino in straight sets on Saturday.
Dominguez-Lino dominated Hantuchova early to move ahead in just over half an hour, using a combination of low ground strokes and drop shots to keep the world's 20th ranked player off-balance.
But Hantuchova settled down and overcame 67 unforced errors to seal the crucial win in two hours and 44 minutes with an unreachable backhand winner.