Barcelona suffered a shock 1-0 defeat by Rayo Vallecano on Sunday, handing Real Madrid the chance to win La Liga if they draw at home to Espanyol this weekend.

Barca’s place in the top four is still not secure either after a third consecutive defeat at Camp Nou continued their late-season wobble and saw them squander the chance to pull away in the race for Champions League qualification.

Madrid remain 15 points clear with five games left to play and while Barcelona have a better head-to-head, Carlo Ancelotti’s side know they will be uncatchable if they take just a point from Espanyol on Saturday at the Santiago Bernabeu.

Barcelona should still have enough for the top four given they sit six points clear of Real Betis in fifth, with five games left to play, but winning this game in hand against an out-of-form Rayo side would certainly have made the run-in more comfortable.

“There are games that get complicated because we don’t start how we should,” said Xavi. “It’s a shame because it was a golden opportunity.”

Instead, their form, as much as their position, will be a real concern for coach Xavi, whose team have now won only twice in their last six matches.

This loss comes after they were beaten at home by Eintracht Frankfurt in the Europa League quarter-finals and then defeated by Cadiz in La Liga, also 1-0.

“We’re struggling a lot at home,” said Sergio Busquets. “We’re in this negative dynamic at Camp Nou. We have a cushion and we had a chance to take advantage but we haven’t managed it.”

Xavi talked on Saturday about “recovering the sensations” of a few weeks ago, when a 4-0 thrashing of Real Madrid at the Santiago Bernabeu looked set to place Barcelona even as favourites in La Liga next season.

But that feels like a distant memory now, with the team’s season in danger of ending with a whimper.

Missing out on the Champions League would be unthinkable for Barcelona, who started the season with debts of more than a billion euros.