Santiago Tarrio Ben and David Borda ensured there will be two Spanish teams in the semi-finals of the inaugural European Golf Team Championships after recording a 3 and 2 victory over Sweden 1 to top Group A.
Spain 2 went into their final group match level on three points with Great Britain 1, knowing only one team could progress to the final four.
And with Lee Slattery and Callum Shinkwin suffering a 3 and 2 defeat at the hands of Sweden 2 on Friday, Borda and Tarrio Ben joined countrymen Scott Fernandez and Pedro Oriol of Spain 1 in the semis after leading from start to finish against Johan Edfors and Per Langfors.
Spain 1, who were already assured of their place in the last four after winning Group C on Thursday, lost to Denmark as the rain began to fall at Gleneagles on Friday.
Iceland and Italy 2 are also through after they maintained their 100 per cent records with victories over Norway and Great Britain 3 respectively in their winner-takes-all matches.
The semi-finals will be played in the foursomes match play format on Sunday morning, with the winners going through to the Gold Medal Match and the losers battling it out for bronze.
After Borda's par won them the opening hole, Spain 2 doubled their advantage when Tarrio Ben fired an eagle at the par-five second.
The Spaniards extended their lead to three holes at the fifth before Langfors' birdie at the eighth got Sweden 1 off the mark.
Spain 2 looked to be cruising towards the semis when they made further birdies at the 11th and 12th but their opponents won back-to-back holes at the 13th and 14th to keep their hopes alive.
But another win at the 15th, and a half at the 16th saw Spain 2 through to the semis, where they will face Iceland.
Borda said: "We are really happy to be in the semi-finals. We didn't expect it at the beginning of the tournament.
"We did our best and we are so happy to be in the semi-finals.
"We were playing against great players – Johan Edfors, he’s won many tournaments on the European Tour. We fought until the end and we are really happy."
After leading for much of the match, Iceland duo Birgir Hafthorsson and Axel Boasson were pegged back when Norway won the 12th and 14th holes to level things up.
But they bounced back brilliantly in the closing stages, taking the 16th and 18th to consign Norway to their first defeat and progress to the semis.
Hafthorsson said: "It would be a great honour to win a medal for Iceland. We’ve played well in our matches and hit lots of good shots, so if that's what it takes to bring a medal home then that will be fantastic."
Italy 2 were also behind for large spells of their match against Connor Syme and Liam Johnston but Francesco Laporta and Alessandro Tadini turned things around with wins at the 11th, 14th and 15th to win by one hole.
They will take on Spain 1 in the final four.
Laporta said: "It was an unbelievable day. We started really badly but we came back on the back nine with some solid golf.
"We made a lot of birdies on the back nine after struggling on the front nine, where we lost two holes after we made bogeys and they made pars but on the back nine we played perfectly.
"On Sunday we will be fighting shot-by-shot for a medal."
Elsewhere Italy 1 claimed their first victory of the week, beating Belgium 4 and 3 in Group D, while there were also comprehensive wins for Portugal and Ireland against Poland and Great Britain 2 respectively.
There will be two British teams in the semis of the Women's Team event after Georgia Hall and Dame Laura Davies made it three Group A wins in a row against Belgium, while Meghan MacLaren and Michele Thomson halved their final match against Finland to finish top of Group C.
Sweden 3 and France 2 are the other sides in the last four.