Stefano Pioli has revealed the referee apologised after ruling out what should have been a valid Milan goal in Monday's defeat to Spezia.
The Rossoneri slumped to a shock 2-1 loss 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 failed to claim a win that would have sent them to the Serie A summit.
The hosts dominated the first half and took a deserved lead through Rafael Leao, just after Theo Hernandez had missed a penalty.
Yet their profligacy cost them in the second half when Kevin Agudelo equalised.
Milan were then left furious as Junior Messias' fine late effort was struck off due to a premature whistle from referee Marco Serra, who had blown up for a foul on Ante Rebic.
Serra appeared to realise his mistake, though that did nothing to appease Milan, who subsequently hit the bar through Zlatan Ibrahimovic only for Gyasi to snatch a last-gasp winner on the counter.
While Pioli was keen to point out the official's error, he acknowledged Milan did not control the game well enough.
"I tried to calm my players down, but I didn't manage as Spezia's goal proves," he told DAZN.
"We knew it was an injustice, we have ourselves to blame, but we share responsibility with the referee.
"I am sorry to say that. He even apologised, maybe that wasn't even a fault. It's a shame.
"However, we should have scored more goals in the first half. It's a bad night and we must react now."
Milan had 25 attempts in total, with eight on target. It was the most shots they have managed in a Serie A defeat since December 2017 against Verona (31).
Leao was a standout performer with four shots and as many key passes, while Ibrahimovic, making his 150th league appearance for the club, had a team-leading eight efforts.
"We could have won the game, somehow we lost," said Pioli, whose side finished the match with an expected goals (xG) value of 2.5.
"We knew we had a good chance, Leao's goal should have given us self-confidence, we failed to seal a win that we strongly wanted, but the season is still long."
Milan remain second, two points behind Inter and one ahead of Napoli in third, with Juventus next up on Sunday.