Osasuna and Real Valladolid will join already-relegated Real Betis in the Spanish second division next season after a nail-biting final day of action in La Liga, which was disrupted when a barrier collapsed at Osasuna.
The match in Pamplona was halted for about 30 minutes when the barrier tumbled to the ground following Osasuna's 12th-minute opening goal against Betis and fans spilled on to the pitch.
About 40 people were treated on site for minor complaints and 10 were taken to hospital, but none suffered serious injury, according to the local Red Cross.
The Spanish professional league (LFP) decided there would be extended halftime breaks in the other three games involving relegation-threatened sides to allow the Osasuna-Betis match to catch up.
The game ended 2-1 to Osasuna, but they were condemned by results elsewhere and relegated after 14 seasons in the top flight.
Valladolid, who were promoted in 2011-12, went down following a 1-0 home defeat by Granada, who along with Almeria and Getafe avoided the drop.
Almeria drew 0-0 at home to fourth-placed Athletic Bilbao and Getafe beat Rayo Vallecano 2-1 in a bad-tempered clash between the two Madrid clubs which ended in a mass brawl.
Betis finished in 20th and last place with 25 points from 38 matches, Valladolid were 19th on 36 and Osasuna 18th on 39, a point behind Almeria and Elche. Getafe finished in 13th with 42 points and Granada in 15th on 41.
Atletico Madrid earlier won their first La Liga title in 18 years thanks to a 1-1 draw at second-placed Barcelona in a thrilling climax to the campaign.
How well will the Phoenix do in this year's A-League?