Mali's bid to reach a second straight Under-17 World Cup final ended in Mumbai when beaten 3-1 by Spain, who will meet England in Saturday's final.
The European side led 2-0 at half-time thanks to a penalty and a slide-rule finish from captain Abel Ruiz.
Mali rallied, but Cheick Doucoure's fine strike was not given even though replays showed it had crossed the line.
Moments later, Ferran Torres headed Spain further ahead before Lassana N'Diaye grabbed a late consolation.
The goal was his fifth of the tournament for the African champions.
Runners-up in 2015 to eventual champions Nigeria, Mali will now play Brazil in a third-place play-off in Kolkata on Saturday.