Milan moved up to join Lazio temporarily in third place in the Italian league after a precious 2-1 win over Parma, five days before they host Barcelona in the Champions League.
Parma had the better chances in the opening stages, but Milan unexpectedly took the lead late in the first half when a Boateng cross was slotted into his own net by Parma defender Paletta in an attempt to clear the danger.
Milan upped the tempo after the break but had to wait until the 77th minute for Balotelli to score the second goal from a freekick, his fourth in three appearances for his new club.
Milan seemed in control and Parma could only halve the distance with a Sansone goal on the stroke of time.
Milan move up to the third position alongside Lazio, who however have a game in hand.