Vincenzo Montella's side headed into the game off the back of defeats against Napoli, Udinese and Sampdoria.

But Mario Pasalic, on loan at the Italian club from Premier League leaders Chelsea, netted the winner in the 89th minute following fine work by Everton loanee Gerard Deulofeu, after Gabriel Paletta and Juraj Kucka had seen red.

Milan, who play Lazio in their next match, move above Fiorentina and up to seventh in the table, while Bologna stay in 14th.