Milan slumped to a shock 2-1 defeat to Spezia as Emmanuel Gyasi scored with almost the final kick of a thriller at San Siro.
Title rivals Inter drew 0-0 with Atalanta on Sunday, but Milan could not take advantage the following day as Spezia came from behind in incredible fashion.
Rafael Leao put Milan ahead after Theo Hernandez's penalty miss, but Kevin Agudelo leveled midway through the second half.
Milan were furious when Junior Messias' fine late effort was struck off due to a premature whistle from the referee, with Zlatan Ibrahimovic then hitting the crossbar.
And Gyasi had the final say, slotting home in the 96th minute to sensationally earn Spezia's first league win at San Siro.