Real Madrid have temporarily delayed Barcelona's LaLiga title celebrations after securing a dramatic 2-1 comeback victory against Mallorca on Wednesday night.

The match marked Los Blancos' first outing since manager Carlo Ancelotti confirmed his upcoming departure to take charge of the Brazil national team, adding extra significance to the encounter.

Madrid needed a win to prevent Barcelona from clinching the title without playing, but found themselves trailing early when Martin Valjent stunned the hosts with a smart finish in the 11th minute.

The champions responded in the second half through Kylian Mbappe, who leveled the score with a sublime solo effort in the 68th minute. The French superstar evaded two challenges before finishing clinically into the bottom-left corner.

With the match heading towards a draw that would have all but confirmed Barcelona as champions, Real Madrid found a dramatic winner in the fifth minute of stoppage time. A defensive mistake by Mallorca allowed Jacobo Ramon to pounce on Jesus Vallejo's flick-on and volley home the decisive goal.

Despite the victory, Real Madrid remain four points behind Barcelona with just six points left to play for in the remaining fixtures. Hansi Flick's Barcelona now need just one win from their final three matches to reclaim the LaLiga crown.

Barcelona could be crowned champions as early as Thursday when they face local rivals Espanyol, which would end Real Madrid's hopes of an unlikely title defense.

The result keeps the title race mathematically alive, but Barcelona's commanding position means they remain overwhelming favorites to secure their first LaLiga championship under German coach Hansi Flick.