MILAN - AC Milan beat Palermo 3-2 for only its second win of the season as the visiting side missed the chance to move provisionally top of Serie A on Saturday.

New signing Carlos Bacca scored twice, including the winner. Giacomo Bonaventura scored Milan's other goal, with a stunning free kick.

Palermo twice leveled through Sweden international Oscar Hiljemark. Coach Giuseppe Iachini was sent to the stands shortly before halftime for dissent, as was his assistant Giuseppe Carillo after Bacca's 75th-minute winner.

More from FoxSports

Mario Balotelli made his second substitute appearance since rejoining from Liverpool on loan, but failed to have an impact.

Palermo lost its unbeaten record and remained two points behind leader Inter Milan, which visits second-placed Chievo Verona on Sunday. Milan moved to within three points of Inter.

Earlier, Empoli recorded its first victory of the season, coming from behind to win 2-1 at 10-man Udinese.

AC Milan was languishing in midtable but had impressed in last week's derby defeat against Inter.

It almost took the lead early when Luiz Adriano burst down the right and crossed toward Bacca. Aljaz Struna nearly put the ball into his own net, but the ball came off goalkeeper Stefano Sorrentino's knee. Milan defender Ignazio Abate picked up an early injury and, although he tried to play on, had to be replaced by teenager Davide Calabria in the 18th minute.

Calabria had an immediate impact as - two minutes later - he sprinted down the right flank and put in a cross which Bonaventura managed to backheel to Bacca, and the Colombia forward fired into the roof of the net.

Palermo leveled 10 minutes later through Hiljemark's header after Milan goalkeeper Diego Lopez completely misjudged a corner. Bonaventura restored Milan's lead five minutes from halftime, earning a free kick and curling a shot into the left side of goal.

Palermo's first goal had been a surprise, but its second was deserved after a fine spell of pressure. And it was Hiljemark again, springing the offside trap to race through one-on-one with Diego Lopez and firing into the back of the net in the 72nd.

But Milan was back in front almost immediately, through Bacca's powerful header from Juraj Kucka's cross. It was Bacca's third goal in four Serie A matches, coming from his first five shots on target.

In Udine, Massimo Maccarone scored in stoppage time after controlling a great pass from Riccardo Saponara. Duvan Zapata had given Udinese the lead in the 19th minute with his first goal for the club, heading in Antonio Di Natale's cross from near the left corner flag.

The match turned on its head in the 72nd minute when Udinese midfielder Panagiotis Kone was sent off for a second yellow card. Empoli leveled less than minute later, Leandro Paredes sidefooting the ball through a sea of legs into the far bottom corner from the edge of the area.