Vinicius Jr. cuts a frustrated figure against Rayo Vallecano at the Vallecas Stadium.
CNN  — 

Real Madrid missed out on the chance to return to the top of La Liga as a retaken penalty gave Rayo Vallecano a surprise 3-2 victory over Los Blancos.

It was Real’s first defeat in the league this season and gives Barcelona a two-point lead at the top of La Liga after 13 games.

The home side took an early lead in Tuesday’s game as Santi Comesa?a scored in the opening five minutes, but Real hit back later in the first half through Luka Modric’s penalty and éder Milit?o’s acrobatic header.

The lead lasted only three minutes as Rayo leveled just before halftime when Thibaut Courtois was unable to parry away álvaro García’s drive.

Dani Carvajal’s handball midway through the second half saw Rayo awarded a penalty to go in front. Courtois saved óscar Trejo attempt, but the goalkeeper came off his line too early and the kick was retaken.

The forward made no mistake the second time as he placed his penalty beyond Courtois’ reach.

álvaro García celebrates Rayo's first goal against Real Madrid.

The result means Rayo now has one win and two draws against the top three teams in La Liga this season – Barcelona, Real, and Atlético Madrid.

“I wasn’t surprised because we all know how they play, they were better and more precise than us today and it’s a well-deserved win for them,” Real Madrid manager Carlo Ancelotti told Movistar Plus, according to Reuters.

“We lost too many challenges. They were overwhelming. It doesn’t matter if you have more quality if your rivals have more intensity than you.

“I think we started the season well but the team has felt the exhausting schedule ahead of the World Cup.”

Real, now without a league win in more than two weeks, next faces Cádiz on Thursday, and after that has a seven-week break while the World Cup takes place in Qatar.

Barcelona, meanwhile, has a chance to extend its lead at the top of La Liga when it plays Osasuna on Tuesday.