Barcelona missed the chance to cut the gap to LaLiga leaders Atletico Madrid to six points as a late penalty gave Cadiz a 1-1 draw at Camp Nou.

Lionel Messi marked a club record 506th league appearance with the opening goal from the spot in the 32nd minute.

That appeared to be enough to give Barca an unconvincing win, but a dreadful week for Ronald Koeman's side ended in fitting fashion.

Clement Lenglet was ruled to have clipped Ruben Sobrino in the area and Alex Fernandez emphatically converted from 12 yards in the 89th minute to earn a share of the spoils.

Barca dictated proceedings in the first half without posing a serious threat to break the deadlock until Iza's trip on Pedri provided Messi with the chance to do so.

He made no mistake in rolling home in nonchalant fashion, though Barca were almost caught cold immediately afterwards, Sobrino diverting the ball wide with his knee with the goal seemingly at his mercy.

Frenkie de Jong and Pedri each had the ball in the net only to see their respective efforts correctly ruled out for offside, the latter denied after the flag was raised against Antoine Griezmann.

Ousmane Dembele fired well wide at the end of a winding run and Messi hooked a difficult chance for a double over the crossbar in a second half largely short on excitement.

Their failure to find the second goal proved costly when Lenglet was left with a wry smile after referee Juan Martinez Munuera pointed to the spot following a seemingly innocuous challenge on Sobrino.

Real Madrid academy product and former Espanyol midfielder Fernandez confidently dispatched the leveller from 12 yards, leaving Barca eight points adrift of Atletico at the summit.

What does it mean? Opportunity knocked... and Barca failed to answer

Barca's Champions League prospects look in tatters after Tuesday's 4-1 humiliation at the hands of Paris Saint-Germain, but Atletico's defeat to Levante on Saturday gave them the chance to fuel hope of a LaLiga title challenge.

Instead, they still have a mountain to climb in that regard after a performance in which they were uninspiring up front and far from assured when tested at the back.

The joy of six

Messi has now scored in six consecutive games - netting nine goals in that span - for the first time since February 2019. He is gathering steam in what could be his final season for Barca.

Lenglet left to rue late foul

Lenglet's foul that gave away the late penalty was one of a team-high four in the match. It may have been dubious, but Lenglet paid the price for living on the edge.

Key Opta Facts

- Barca have failed to keep a clean sheet in eight games in a row in all competitions (15 goals conceded) for the first time since 2015.
- Sergio Busquets is the fourth Barca player to reach 400 LaLiga appearances after Messi (506), Xavi (505) and Andres Iniesta (442).
- Barca have collected just 47 points after their first 23 LaLiga games, their lowest tally at this stage of the season since 2006-07 (46 points).
- Barca have failed to win in their two games against Cadiz in the same LaLiga season for the first time in the competition.
- Cadiz won their first LaLiga penalty this season and their first since May 2006. They have converted their last seven penalties in the top-flight.

What's next?

Barca host Elche on Wednesday before a tricky trip to Sevilla on Saturday, a day before Cadiz return to action at home to Real Betis.