Milan secured successive Serie A wins for only the second time this season as they won 3-2 away to Bologna, who had coach Sinisa Mihajlovic back on the bench for the first time since his bone marrow transplant last month.
Mihajlovic, who was diagnosed with leukaemia earlier in the year, received a huge ovation as he walked out pre-match, though his presence was not enough to inspire Bologna to a first league win over Milan since January 2016.
Milan's opening goal will have come as a relief to Krzysztof Piatek as the Poland international scored his first club goal for almost two months from the spot, before Theo Hernandez netted one at either end to put Bologna back in contention.
They were soon trailing by two once again in the second half thanks to Giacomo Bonaventura's sumptuous strike and that proved decisive, giving Bologna too much to do despite Nicola Sansone's late penalty restoring a modicum of hope.
Piatek ended his goal drought from the spot in the 15th minute, converting after being sent tumbling by Bologna defender Mattia Bani.
The hosts failed to mount much of a response and found their task made even trickier just past the half-hour mark, Hernandez beating the goalkeeper from close range after collecting Suso's wonderful disguised pass.
Hernandez found the wrong net late in the half, however, directing a corner past Gianluigi Donnarumma after Stefano Denswil had ducked under the ball.
But any hope of a Bologna comeback was effectively ended within a minute of the second half starting, as Bonaventura curled a fine effort into the left side of the goal from 20 yards.
Sansone's penalty – given after a VAR review – in the 84th minute following Hernandez' clumsy foul on Riccardo Orsolini ensured it was a nervous ending for Milan, but the visitors held on.