Lionel Messi scored a penalty for Barcelona against Cadiz on Sunday,.

Madrid (AFP) - Barcelona compounded their Champions League misery at the hands of Paris Saint-Germain by drawing on Sunday at home to Cadiz, who scored an 89th-minute penalty to snatch a 1-1 draw at Camp Nou.

Lionel Messi broke a Barcelona record by making his 506th La Liga appearance for the club and marked the milestone with a goal, his own spot-kick looking likely to secure a narrow win for his side.

But Barca failed to score a second despite a hatful of chances and Cadiz punished them with a late equaliser, Alex Fernandez converting from the spot after a wild swing from Clement Lenglet.

The draw means Ronald Koeman’s side move only one point closer to Atletico Madrid in the table instead of three, after Atletico gave their rivals an opportunity by losing at home to Levante on Saturday.

“I’m very disappointed,” said Koeman. “Maybe even more than after the game on Tuesday. We were on a good run in the league and we could have cut the distance with those above us.

“We didn’t have many problems and it’s a game that with our quality we should win, but we haven’t done it.”

Barcelona had won their previous seven games and another victory would have put them back in sight of Atletico, who are now eight points ahead of the Catalans. Real Madrid are only three points behind Atleti but have played a game more.

“It hurts a lot, after Atletico’s result, we had a chance,” said Gerard Pique. “So lose two points like we did in the last minute is tough to swallow.”

It also brings an end to a hugely disappointing week for Barcelona after their 4-1 hammering by PSG, with Elche up next on Wednesday before a tough trip to fourth-placed Sevilla next weekend.

Barca had 21 shots to Cadiz’s three but having failed to capitalise, they were always vulnerable to a lapse at the back, which the out-of-form Lenglet duly provided.

Fernandez held his nerve to score the equaliser, an even more memorable goal for him perhaps as a Real Madrid fan and brother of Madrid defender Nacho Fernandez.

Messi’s goal was his 16th of the season, drawing him level with Atletico’s Luis Suarez at the top of the La Liga charts.

The 33-year-old cooly rolled the ball into the corner after Pedri was stopped from breaking through, sandwiched between Salvi and Isaac Carcelen.

Both Frenkie de Jong and Pedi had goals ruled out for offside while Messi almost teed up Antoine Griezmann early in the second half. Ousmane Dembele’s driving run lacked a finish too.

Then Cadiz’s moment came, a long ball launched into the box and Lenglet failing to spot Ruben Sobrino arriving behind him. Lenglet swung a leg but Sobrino touched the ball away first, allowing Fernandez a special equaliser.

Real Sociedad later destroyed Alaves 4-0, with Alexander Isak scoring his first ever hat-trick in La Liga. La Real sit fifth, four points behind Sevilla, having played two games more.