Barcelona lost ground on arch rivals Real Madrid in the Spanish title race after a deserved loss at Real Sociedad.
Needing victory to move level with Real, who won earlier in the day, Barca trailed when Alex Song headed into his own goal shortly after the half hour.
The visitors levelled within four minutes as Lionel Messi fired a precise 18-yard shot into the bottom corner.
Antoine Griezmann slid Sociedad ahead again after the break before turning provider for David Zurutuza to prod in.
It was a disappointing display by defending champions Barca, who started the weekend on top of La Liga with a superior goal difference over Real Madrid and Atletico Madrid.
But Real moved three points clear after
a 3-0 home win
against Elche earlier on Saturday which left the Catalans playing catch up.
Barcelona rested a host of key players following Tuesday's
Champions League win at Manchester City,
but the move did not pay off as Gerardo Martino's men produced a sloppy display which lacked fluency and any genuine attacking threat.
After a first-half display where his team dominated possession without creating the better opportunities, Martino's frustration boiled over at the interval and he was ordered to watch the second half from the stands by referee David Fernandez.
Barcelona's bogey team
Barcelona's defeat means they have not beaten Real Sociedad in San Sebastian in their last five attempts. The Catalans' last win there came in 2006-07, when goals from Andres Iniesta and Samuel Eto'o earned them a 2-0 win.
His side had gone behind when Cameroon midfielder Song, under pressure from Sociedad midfielder Gorka Elustondo, sent Sergio Canales's pinpoint right-wing cross flying past Barca keeper Victor Valdes.
The visitors were quickly level when Argentine superstar Messi deftly controlled a square pass before smashing his 25th goal of the season past home keeper Claudio Bravo.
But they were fortunate not to already be further behind after former Arsenal striker Carlos Vela missed a host of chances for the Basque side.
If Martino was already unhappy, then his mood further darkened as Sociedad took control in the space of five minutes before the hour mark.
After a high tempo start to the second half, the hosts deservedly regained the lead when Vela pounced on a stray header before squaring to Griezmann for his 15th goal of the season.
The France Under-21 winger then picked out Zurutuza, who was allowed a free run into the Barca area from deep before bravely poking past the onrushing Valdes.
Barca rarely threatened to produce a dramatic fightback as Sociedad, who have not been beaten in the Catalans' last five visits to San Sebastian, moved up to fifth.
Atletico could also move three points clear of Barca, with 13 games remaining, if they manage to beat Osasuna on Sunday.
- 01 Bravo
- 31 Zaldúa
- 20 José Ángel Booked
- 04 Elustondo (Rubén Pardo - 92' )
- 03 González
- 06 Iñigo Martínez
- 17 Zurutuza
- 05 Bergara
- 11 Vela
- 16 Canales Booked (Ansotegi - 84' )
- 07 Griezmann (Xabi Prieto - 74' )
- 02 Martínez
- 08 Seferovic
- 10 Xabi Prieto
- 13 Zubikarai
- 14 Rubén Pardo
- 15 Ansotegi
- 23 Javi Ros
- 01 Valdés
- 02 Montoya (Sánchez - 73' )
- 21 Adriano
- 17 Song (Fábregas - 61' )
- 15 Bartra Booked
- 03 Piqué Booked
- 16 Busquets Booked
- 08 Iniesta
- 10 Messi
- 07 Pedro
- 11 Neymar
- 04 Fábregas
- 06 Xavi
- 09 Sánchez
- 13 Pinto Colorado
- 14 Mascherano
- 20 Tello
- 22 Dani Alves
Ref: David Fernández Borbalán