Cristian Brocchi enjoyed a winning start to his stint as AC Milan coach as they ran out 1-0 winners against struggling Sampdoria at the Stadio Luigi Ferraris.
The visitors kept alive their slim hopes of a top-five Serie A finish this season as Carlos Bacca's strike with just less than 20 minutes remaining proved decisive.
Bacca had previously been wasteful, missing a number of clear chances, though he produced the one moment of quality to ensure his dry spell of one goal in eight competitive matches was ended.
Samp, meanwhile, are just six points clear of the drop after Carpi and Frosinone picked up maximum points over the weekend.
Milan - who parted company with Sinisa Mihajlovic this week - started brightly in the new 4-3-1-2 system adopted by Brocchi, with Mario Balotelli hitting a free-kick narrowly over from 25 yards and Bacca firing wide from the edge of the box.
Vincenzo Montella's men responded and just before the 20-minute mark Fabio Quagliarella latched on to a misplaced pass from Juraj Kucka before launching a powerful strike wide of Gianluigi Donnarumma's far post.
The hosts thought they had taken a 25th-minute lead when Dodo was on hand to poke home an acrobatic cross from Fernando, but the linesman ruled it out for offside on the Inter loanee in what was an extremely tight call.
Emiliano Viviano made a remarkable stop at the other end to deny Bacca from close range as Ignazio Abate's cross found him via the head of Balotelli, but the former Sevilla man's point-blank shot was somehow turned away.
Donnarumma was on hand to parry a Fernando shot with two minutes left in the half as the 17-year-old looked for his eighth clean sheet of the season.
Balotelli almost made Samp pay for their repeated fouls on the edge of the box, with the Liverpool loanee blazing an effort just over early in the second half.
Abate produced a crucial defensive header just before the hour mark from a Dodo cross to deny Lorenzo De Silvestri, who was lurking at the far post.
Bacca missed a gilt-edged chance to give Milan the lead as Kucka slipped him through having beaten the offside trap. After a first touch that took him wide, the Colombian attempted a rabona finish that allowed Viviano to get a vital palm to the ball.
The visitors came agonisingly close again moments later, this time the shot from Kucka curling inches wide of the left upright.
Brocchi was left standing in amazement as his team squandered a three-on-one break, with Bacca again proving wasteful as he was indecisive and subsequently jockeyed away from goal.
However, Milan's top scorer was not to be denied as he struck a 71st-minute opener for the away team, finishing crisply into the far corner from Bonaventura's assist.
Montella's side came close to a leveller late on when a Fernando free-kick came off the shoulder of Modibo Diakite and dropped wide of Donnarumma's far post.