Raul Garcia's superb 90th-minute strike consigned leaders Real Madrid to a 2-1 defeat at Osasuna in La Liga on Saturday, in a blow to their title hopes.
Champions Barcelona trail Madrid by two points but can overtake them on Sunday if they beat Levante at Camp Nou.
Alvaro Arbeloa's Madrid put on a below-par performance in Pamplona and fell behind to an Ante Budimir penalty, before Vinicius Junior pulled the visitors level.
The second leg of Madrid's Champions League play-off against Jose Mourinho's Benfica on Wednesday seemed to play on their minds as they failed to kick on at El Sadar.
Vinicius, who scored a sensational goal to give Madrid a slender first-leg lead but was then the victim of alleged racial abuse, thought he had earned his team a point before Garcia blasted home the winner.
"It was not a good game from us... we have to play a lot better," Arbeloa told reporters.
"Nobody likes to lose, us least of all, but we're not hurt. There's a long way to go.
"We had control at some points but we lacked speed in our play... on Wednesday we have another final, another game that is very important for us."
Croatian target man Budimir curled narrowly wide of Real Madrid goalkeeper Thibaut Courtois's far post early on, the first of many problems he gave the visitors.
The Belgian stopper made an excellent save a few minutes later, after Budimir tried to nod home Ruben Garcia's cross under pressure from Alvaro Carreras.
Budimir also clipped the post with a header as Osasuna impressed, with their victory helping them rise to ninth.
Madrid defender David Alaba came close when Alejandro Catena blocked his shot, shortly before the hosts took the lead.
Budimir burst into the area and went down under a challenge from Courtois. Although he was initially booked for diving a VAR review showed the goalkeeper stood on his foot.
The veteran forward took the resulting penalty himself and sent Courtois the wrong way to give Osasuna the lead.
"I knew it was a penalty and I wanted to stay cool (while it was being reviewed)," said Budimir.
Osasuna sat deep at times in the second half, looking to fend off 15-time European champions Madrid.
Arda Guler came close with a vicious shot that flew just over.
Chasing an equaliser, Arbeloa threw on creative duo Trent Alexander-Arnold and Brahim Diaz and his team began to take control.
French superstar Kylian Mbappe put the ball in the back of Osasuna's net but had edged offside, although the equaliser was not long in coming.
Fede Valverde charged into the box with the ball, unperturbed by Osasuna's defenders bouncing off him, before crossing for Vinicius to tuck home.
It was the Brazilian's fifth goal in his last four games across all competitions, having found his best form since Arbeloa replaced Xabi Alonso at the helm in January.
Bd-pratidin English/TR