MADRID — It was a matter of pride for Real Madrid.
There is little hope of winning the Spanish league. But the last thing it wanted to do was hand Barcelona the title in advance.
And it needed a goal deep into stoppage time to achieve its objective Wednesday.
Jacobo Ramón scored five minutes into injury time and Madrid rallied to beat Mallorca 2-1 and delay Barcelona's title celebrations.
Madrid needed the victory to keep Barcelona from clinching its 28th league title in advance. The Catalan club remains four points ahead and can still lift the trophy with a win at city rival Espanyol on Thursday.
Mallorca took the lead on Wednesday with a goal by Martin Valjent in the 11th minute and stayed ahead until Kylian Mbappé beat a couple of defenders to equalize in the 68th.
Ramón netted the go-ahead go from inside the area five minutes into injury time to keep Barcelona from winning the title.
Mbappé is still in the race to be the league's leading scorer and reached 28 goals, three more than Barcelona's Robert Lewandowski. Mbappé had a hat trick in Madrid's loss to Barcelona on Sunday, when the Catalan club virtually secured the title by coming from behind to win 4-3 in the last ''clasico'' of the season.