AC Milan had to hang on in the second half after twice surrendering the lead, but emerged from Cagliari with all three points to keep up with the pace in the Serie A title race.
All five goals came in the first half as Daniele Ragatzu cancelled out Marco Borriello’s opener before scoring again to level after Klaas Jan Huntelaar had put Milan back in front.
But Davide Astori’s 38th-minute own goal proved to be the winner for Milan as Cagliari could not do anything with a string of second-half chances.
The win keeps Milan three points behind rivals and league leaders Inter Milan, and two points behind Roma.