Gennaro Gattuso's position was looking tenuous following back-to-back defeats to rivals Inter in the derby and Betis in the Europa League. His players might just have given him some respite.
Patrick Cutrone gave his side an early lead but Milan were quickly pegged back. Riccardo Saponara and Fabio Quagliarella scored two quick goals to put the away side in front on the night.
Gonzalo Higuain continued his fine form with the equaliser before half-time, before Suso scored a second half winner to ensure his side got the victory in a thriller.
It was enough to move them level on points with the opponents, in joint 5th spot. However, Milan do have a game in hand after their season opener against Genoa was postponed.