(CNN) -- Barcelona coach Pep Guardiola paid the price for fielding a team of reserves as his Primera Liga champions suffered a shock 1-0 home defeat to Osasuna on Saturday night.
Barcelona players celebrate collecting the Primera Liga trophy despite their 1-0 home defeat by Osasuna.
With one eye firmly on Wednesday's Champions League final, Walter Pandiani's goal proved enough for relegation-threatened Osasuna to pick up a crucial three points -- although they remain in the relegation zone with just one match remaining.
Barca also had youngster Marc Muniesa sent off following a crude challenge while Guardiola himself was dismissed minutes later for arguing with the referee.
Despite the disappointing result, the Nou Camp was still in party mood as the squad were handed the Primera Liga trophy after what has proved a sensational season.
Five teams are still battling to avoid the final relegation position, after Saturday saw two clubs lose their top flight status.
A 76th minute goal from Nikola Zigic saw Racing Santander win 1-0 at Recreativo Huelva, a defeat which confirmed the home side's relegation, while Numancia join them in the second tier of Spanish football after Roberto Soldado's goal saw them beaten at Getafe.
Despite their win, Getafe are among the quintet who can still be relegated on a nervous final day. Osasuna, Sporting Gijon, Real Betis and Valladolid are also battling to avoid the drop.
Meanwhile, a last minute strike from Diego Perotti gave Sevilla a 1-0 win over Deportivo la Coruna which assures the Andalucian side of Champions League football next season.
Sevilla had plenty of possession but struggled to break down a resolute Depor defence until the final minute when Perotti appeared in the box to convert an Adriano cross from the right-wing.
Elsewhere, Diego Forlan overtook Barcelona's Samuel Eto'o as the top scorer in Spain with 31 goals, scoring a superb hat-trick as Atletico Madrid consolidated fourth place with a superb 4-1 win at Bilbao.
A Raul Garcia volley put the visitors ahead but Bilbao drew level midway through the second half with Xabi Etxeita scoring.
But Forlan settled things with two fine goals before he completing his hat-trick from the penalty spot.
Villarreal leapfrogged Valencia with a 3-1 win over their local rivals and still have an outside chance of a place in the Champions League, while Valencia will have to be content with a Europa League place.
Two goals from Joseba Llorente gave Villarreal a commanding lead and although David Villa pulled a goal back, Ruben Cani assured the home side of victory mid-way through the second half.
On Sunday, Real Madrid face Real Mallorca in their final home game of the season.