La Liga leaders Barcelona fell to a first home defeat in any competition for more than two years when they were beaten 4-3 by Real Betis at the Nou Camp on Sunday despite Lionel Messi returning from injury, while Ivan Rakitic was sent off for the Catalans.
Betis's livewire winger Junior gave the visitors a deserved lead in the 20th minute, finishing off a hugely impressive counter-attack that had started in their own penalty area, while captain Joaquin doubled their lead in the 35th after another venture down the wing from Junior.
Messi pulled Barca back into the game by converting a penalty midway through the second half but Betis restored their two-goal cushion through Giovani Lo Celso with the help of an uncharacteristic error from Barca's usually reliable goalkeeper Marc-Andre ter Stegen who fumbled the shot into the net.
Arturo Vidal quickly responded with a goal down the other end but Rakitic was then dismissed for a second booking and Sergio Canales soon made it 4-2, sliding to the floor to knock in a pass from the electric Junior.
Messi scored from close range in stoppage time but Betis hung on to clinch a first league win at the Nou Camp since 1998.
The defeat leaves Barca on 24 points after 12 games, one ahead of nearest challengers Atletico Madrid in second -- who are also their next opponents -- and Alaves in third.
The atmosphere at the Nou Camp at kick-off was lifted by the return of Messi, who broke his arm against Sevilla three weeks ago, even though the Catalans had won four and drawn one of their five games without their all-time top scorer.
The Argentinian came close to scoring in the opening minute but failed to properly connect with the ball and Betis quickly asserted themselves, seriously challenging Barcelona for ball possession, the rarest of sights for opponents at the Nou Camp.
Betis had squandered several chances before Junior broke the deadlock although it took an outstanding save from visiting goalkeeper Pau Lopez, formerly of Barca's neighbours Espanyol, to prevent Clement Lenglet from levelling before Joaquin made it 2-0.
Barca coach Ernesto Valverde took off midfielder Arthur for Vidal at the start of the second half to give his side more dynamism but they continued to leak chances and Betis showed no remorse.
It was the Catalans' first defeat at home since they were beaten 2-1 by Alaves in September 2016 and the first time they have conceded four goals in a league game since they were beaten 4-2 by Deportivo La Coruna in April 2003.