Defending champions Barcelona slipped six points behind La Liga leaders Real Madrid as they lost 1-0 away to Getafe.
Pep Guardiola's side dominated possession, but were out of sorts throughout the match at the Coliseum Alfonso Perez, and rarely looked like securing the win they so desperately wanted.
And after Real's earlier victory over city rivals Atletico Madrid, Barça were sent home empty-handed as full-back Juan Valera headed home an unlikely winner for Getafe in the 67th minute.
David Villa had an early chance as Barça made a positive start which also saw Lionel Messi go close with a bending free-kick. The champions continued to probe, with Villa struggling to make progress on the left before Chilean international Alexis Sanchez sent a speculative effort into the stand.
Valera offered a decent outlet for the hosts, who were content to sit back and contain Barcelona while tentatively countering when the opportunity arose.
Barça finally came close in the 36th minute, Dani Alves bursting down the right and cutting the ball back after being found by Messi, but Alexis' shot was saved smartly by Miguel Moya. Alexis then saw another attempt deflected over for a corner but Getafe could have ended the half ahead when Diego Castro was found by Miku's cross only to see Alves do just enough to scupper his chance.
The Catalans were labouring, while Valera wastefully shot wide for Getafe as he powered forward in space on the right. Messi drilled a low effort from the edge of the box which Moya got down to hold, while Alexis appealed for a penalty when he was overpowered by Cata Diaz on the edge of the box.
Getafe landed the sucker punch in the 67th minute and, while it was against the run of play, Barcelona had nobody to blame but themselves. Fittingly it was Valera who scored it, capitalising on the visitors' failure to get rid of a routine corner from Pablo Sarabia and powering home the header past Victor Valdes.
Pedro was sent on from the bench and forced a save from Moya with a well-struck shot as the Catalans finally injected some urgency into their endeavours. The winger should have done better with his next effort, though, as he was found by Xavi's incisive pass.
Sergio Busquets wasted a glorious opportunity when he threw himself down in the box rather than shoot, cross or pass the ball, and was booked as a result. Messi put the ball in the net from Seydou Keita's squared ball but the midfielder was ruled to have been in an offside position.
The match went to the wire as Messi hit the post and Pedro hit the resulting loose ball wide but Getafe held on for a massive victory.
