Milan have won just four of 11 Serie A games so far this term.
"It has been a difficult time for everyone," Allegri told Milan Channel. "But the Coach has done a very good job.
"He has been questioned by everyone from outside, but he has remained humble and had the courage to change things around.
"It is good management by the owners. We have always had faith, and the fans have understood."