The returning Lionel Messi scored twice but was unable to prevent LaLiga leaders Barcelona slipping to a chaotic 4-3 defeat to Real Betis at Camp Nou.

Messi – making his first appearance since fracturing his arm against Sevilla on October 20 – could only watch on as Barca's defence was ripped apart by Betis, who ended a run of eight straight defeats away to the Catalan side.

Ernesto Valverde's men started sluggishly and were punished after 20 minutes when Junior scored his second league goal of the season before veteran winger Joaquin doubled their advantage 11 minutes before the interval.

Messi pulled one back from the penalty spot after 68 minutes before Marc-Andre ter Stegen spilled Giovani Lo Celso's shot into his own net three minutes later.

Arturo Vidal gave Barca hope of a grandstand finish 11 minutes from time but Sergio Canales slid home a Betis fourth with seven minutes remaining, shortly after Ivan Rakitic was sent-off, and not even a second from Messi in stoppage time could save the hosts. 

Betis started with a swagger – Joaquin blazing over after six minutes – and were rewarded in the 20th minute when Junior collected William Carvalho's pass on the left, cut inside Sergi Roberto and fired a crisp drive inside Ter Stegen's right-hand post.

Pau Lopez superbly tipped over Clement Lenglet's stretching volley five minutes later before an incisive counter attack doubled Betis' advantage in the 34th minute.

Junior's low cross was met at the back post by Cristian Tello, who picked out Joaquin to slide past Ter Stegen from 10 yards for his second league goal of the campaign.

Moments after firing agonisingly wide of Ter Stegen's post, Tello pulled Jordi Alba's shirt in the area and Messi slammed home the resulting spot-kick.

Ter Stegen then allowed Lo Celso's drive to slip through his grasp after 71 minutes for Betis' third before substitute Vidal finished from close range after being teed up by Munir El Haddadi.

Rakitic received a second yellow card for a foul on Lo Celso before Canales appeared to put the result beyond doubt, sliding home Junior's cross seven minutes from time, but Messi ensured there was late drama, tucking home Vidal's pass deep into stoppage time. The goal was eventually given after a VAR review for offside, but it was too little, too late for Valverde's shell-shocked side.

What does it mean? Betis take advantage of Barca generosity

Few could have anticipated such a slapstick performance at the back from Barca, who conceded four goals at Camp Nou for the first time since April 2003. Victory for Espanyol against Sevilla later on Sunday could see them pull level with their city neighbours at the LaLiga summit. Betis, meanwhile, can toast a momentous win that lifts them up to 12th.

Joaquin rolls back the years

One of LaLiga's most popular players, 37-year-old Joaquin was instrumental in Betis' stunning first-half performance and showed superb composure to coolly slot past Ter Stegen to double his side's advantage.

Pique pulled apart

The former Spain defender was turned inside out by Betis' rampant attackers in a hapless first-half display and looked like a shadow of his former self alongside Lenglet at the heart of the Barca backline.

Key Opta facts:

- Barcelona have lost a LaLiga home game for the first time since September 2016 against Alaves (1-2), 792 days ago.
- Betis have won a LaLiga game against Barcelona at Camp Nou for the first time since May 1998 (3-1), with Luis Aragones on the bench.
- This was the first time Barcelona have conceded four goals in competitive game at the Camp Nou since April 2003 vs Deportivo de La Coruna (2-4).
- Quique Setien is the first ever Real Betis manager to have won a LaLiga away game against both Barcelona and Real Madrid.
- Setien is the only away manager to win at the Santiago Bernabeu and Camp Nou in LaLiga in the last 10 seasons.
- Barcelona have conceded 18 goals in LaLiga this season, their worst defensive total after the first 12 games since 1974/75 (also 18 goals).
- Lionel Messi has scored 16 goals in 18 LaLiga games against Betis, 12 of them coming at the Camp Nou.
- Barcelona’s Marc-André ter Stegen has become the German goalkeeper with the most appearances in LaLiga (92), surpassing Bodo Illgner (91).
- Joaquin Sanchez has scored five goals for Betis against Barcelona in LaLiga, more than versus any other opponent with the Green-And-Whites.

What's next?

Barca face a mouth-watering visit to Atletico Madrid as they look to return to winning ways after the international break, while a buoyant Betis travel to Villarreal.