Getty Images

It may have looked like a massive upset was in the cards when La Liga's last place side Almeria took a 2-0 lead over title chasers Real Madrid, but the heavyweights came back from behind to win 3-2 on Sunday -- albeit in very controversial circumstances.

Almeria took the lead just a minute into the match when Largie Ramazani scored and then went up 2-0 a couple of minutes before halftime courtesy of Edgar Gonzalez. In a second half that saw some questionable refereeing calls and one of the latest goals in the league's history, Real Madrid scored three times and regained a two-point lead on Girona atop the table. Almeria, meanwhile, continue their abysmal streak at the bottom of the league -- they have yet to win a game, 21 matches into the season.

The bizarre match set up for a war or words between Real Madrid and Almeria players, mainly as it pertained to the role that VAR played in what was one of the most eventful matches of the season.

Here's a timeline of the chaotic events that took place at the Santiago Bernabeu on Sunday.

1' Almeria take the lead

The match got off to the most unlikely of starts when Almeria scored first. Lucas Robertone's pass into the penalty area found Ramazani, whose perfectly timed run meant he was able to score from close range -- and celebrate in style.

43' A second for Almeria

Though Real Madrid took full control of possession, Almeria outshot them and eventually reaped the rewards of their work with a second goal. Gonzalez scored in spectacular fashion, too, with a shot from outside the box that sailed past Kepa Arrizabalaga.

57' Comeback - and controversy - begins

Real Madrid kicked off a push to get back into the game and finally pulled one back when they were awarded a penalty after Kaiky Fernandes was called for a handball. VAR reviewed the call and saw that Joselu was on top of Fernandes and headed the ball before it hit the defender's arm before officially giving Real Madrid the spot kick. Jude Bellingham scored for his 14th league goal of the season.

63' Almeria goal called back

It looked like the visitors would go up 3-1 after Dion Lopy won the ball off Bellingham in Almeria's half and sent his team on the run and Sergio Arribas finished from close range. VAR steps in, however, and surprisingly calls a foul on Lopy and rules out the goal.

67' Real Madrid equalize

Four short minutes later, Vinicius Junior scores the equalizer after Aurelien Tchouameni's cross landed in the box. VAR also took a peek at this one with the suspicion that the goalscorer may have committed a handball before the ball fell into the back of the net but controversially ruled it came off his shoulder and allowed the goal to stand.

90+9' Real Madrid score the winner

The fourth official gives a minimum of 11 minutes of stoppage time, which is enough for the hosts to score a game winner. Bellingham's header near goal floated towards the other post, where Dani Carvajal made a quick run and finished off the chance inches from goal. It was the latest game-winning goal Real Madrid had ever scored in La Liga and ensured the match would be remembered for its controversial nature.

Post-match reaction

Almeria were very critical of the refereeing team once the final whistle blew. Defender Marc Pubill told DAZN, "Someone had decided that we couldn't win here," while midfielder Gonzalo Melero added, "I feel that we've been robbed."

Real Madrid, naturally, were kinder towards the officials. 

"If he can see all the episodes calmly, he will notice that all the referee's decisions were correct," Carvajal said post-match. "VAR helps football to be more fair."

Carvajal's manager Carlo Ancelotti echoed his statements.

"Referee's decisions were correct today. I understand the reaction from Almería but it was all correct," he said.