Real Mallorca finished on a winning note but it was not enough to prevent them from being relegated to the Segunda Division on a tense final day in Spain as they beat Valladolid 4-2..
The Balearic Island outfit came into the last round of fixtures bottom, needing a win over mid-table Real Valladolid and for results elsewhere to go their way if they were to avoid the drop.
They did what they could by beating Valladolid in convincing fashion, but unfortunately for them Celta Vigo's victory over Espanyol meant the win was academic as they were consigned to the second tier.
Mallorca, who have been a fixture in the top flight since 1997, had given themselves a chance of staying up by taking four points from their previous two games and they further boosted their hopes by taking a 17th-minute lead through Alejandro Alfaro's close-range finish.
Valladolid threatened to put a spanner in the works as they drew level on the half-hour through Alberto Bueno, who slotted home Daniel Larsson's pass from the right, but Mallorca were back in front before the break thanks to Jose Luis Marti.
The 38-year-old midfielder found the roof of the net from 20 yards out to make it 2-1.
It was 3-1 just before the hour mark when Mexico international Giovani Dos Santos drilled home from distance and Mallorca further increased their lead 10 minutes later when Javi Marquez fired home from the edge of the box.
Almost immediately Valladolid pulled another goal back when Omar Ramos tucked home a pass from Bueno.
Mallorca ensured Valladolid would not get any closer in the final stages but in the end the three points proved not enough to salvage their Primera Division status.