( dpa )- Barcelona closed the gap on Spanish leaders Real Madrid to six points with a last-gasp 1-0 home win Sunday over spirited Osasuna .
Barca won thanks to a goal three minutes from time from supersub Xavi Hernandez, who had only been on the field for five minutes.
A shot from Andres Iniesta rebounded off Osasuna defender Hector Font and - with keeper Ricardo Lopez on the floor - Xavi calmly put away the rebound to make it 1-0.
Barca deserved to win, attacking from start to finish in difficult, rainy conditions.
Thierry Henry, Lionel Messi and Iniesta all went close in a one- sided first half.
The one-way traffic continued after half-time, but toward the end the Osasuna defence improved, and Ronaldinho - on for the weary Messi - looked overweight and out of touch.
However, just when Osasuna seemed to have weathered the storm - in both climatic and football terms - came Xavi's late goal.
"This is a victory which should give us a lot of morale," Barca coach Frank Rijkaard told the media. "I don't think about Real Madrid. They have an advantage, and at the moment they are the best team."
Barca now have 47 points from 22 games, six less than Real, who suffered a shock 2-0 defeat Saturday in Almeria .
Sunday turned out to be a good day for La Liga's two Catalan sides.
Straight after Barca's late win, crosstown rivals Espanyol won 1-0 at Getafe , a result that takes them up to joint third with Villarreal.
The only goal in Getafe came in the 17th minute, when young Espanyol forward Jonathan Soriano - standing in for injured Spain striker Raul Tamudo - scored with his left foot on a pass from veteran Francisco Rufete .
Espanyol now have 39 points from 22 games, same as Villarreal, who were held to a 1-1 draw at home by midtable Mallorca .
Villarreal took the lead in the 27th minute when Guiseppe Rossi converted from the penalty spot, after Santi Cazorla had been pulled down by Hector Belenguer .
But 11 minutes later Mallorca were given a penalty of their own, when Gonzalo Rodriguez was adjudged to have pushed Sergio Ballesteros at a corner. Angelos Basinas calmly made it 1-1 from the spot.
Villarreal pushed strongly for the winner toward the end but were kept at bay by a solid Mallorca defence .
Espanyol and Villarreal are one point ahead of fifth-placed Atletico Madrid, who were held 1-1 by hard-working Murcia.
Murcia went ahead in the 52nd minute through a Jofre Mateu penalty, after Atletico defender Fabiano Eller had pulled down Ivan Alonso.
Luis Garcia equalized for Atletico 11 minutes later with a sweet left-footed drive after picking his way through the Murcia defence .
But Atletico were then crippled by teenager Sergio Aguero limping off injured - and by the poor form of fellow striker Diego Forlan .
The draws leave Villarreal joint third with Espanyol - with 39 points from 22 games - and Atletico fifth on 38.
Racing Santander remain sixth on 34 points after battling out a 1- 1 draw at doomed bottom team Levante .
Sunday saw the resurgence of two teams who have punched below their weight so far this season: Sevilla and Valencia.
Sevilla won 2-1 in Huelva with two second-half goals from league top scorer Luis Fabiano . The Brazilian is now two goals clear at the top of the scorers' chart with 16 goals.
Valencia, for their part, scored their first league win since November, 2-0 in Valladolid with late goals from Juan Mata and David Villa.
Sevilla now move up to seventh and Valencia to ninth.
In eighth place are surprise package Almeria and in 10th place are Zaragoza , 1-0 winners over Athletic Bilbao .
The defeat at home to Sevilla leaves Huelva second from bottom with 22 points, one point less than Deportivo Coruna , who threw themselves a lifeline by winning 1-0 Saturday at fellow strugglers Betis .