On his return to Italy Balotelli said he would celebrate in front of Nerazzurri supporters should he score in Sunday's Milan derby, despite the fact he played in black and blue for the best part of four years.
Resentful Inter fans have vowed to do everything they can to distract their former player as he looks score his fifth goal in four games and pull Milan four points clear of Inter in the race for a Champions League spot.
Allegri told Milan Channel: "Mario knows exactly what kind of atmosphere awaits him. He will be targeted by our opponents.
"It will be a test of his maturity because he must concentrate only on his football and using his instincts."
Both Milan clubs registered confidence-boosting wins in Europe this week but the Rossoneri arguably have more reason to be cheerful than Inter, who beat Cluj 3-0 in the Europa League.
Goals from Kevin-Prince Boateng and Sulley Muntari got the San Siro bouncing as Milan shocked Barcelona 2-0 in the first leg of their Champions League knockout tie and Allegri hopes that adrenaline rush carries through the 90 minutes of Sunday's derby.
"It was a wonderful night," he added. "Full credit to the lads who played a great game. We gave ourselves a small advantage that will allow us to go to the Nou Camp with more of a chance than we had before.
"But now we have the derby with Inter which is much more important. We've lost three derbies in a row and we need to get a result to leave them behind us.
"They will be venomous and aggressive as they look to make up for their defeat in Florence."
Inter were in disarray as Fiorentina strolled to a 4-1 win last time out but Nerazzurri coach Andrea Stramaccioni is optimistic a resolute display in Romania will restore confidence to his players.
He told inter.it: "We go out onto the pitch with all the will in the world to put an end to our poor recent run.
"We made moves towards doing that on Thursday but tomorrow [Sunday] will be a totally different game.
"We have the desire to turn up and play the football we started the season with and put the bad performances behind us."
When Inter beat Juventus in Turin to end the Serie A champions' 49-game unbeaten run in November, Milan were 13 points behind their city rivals and struggling.
A run of nine wins from 12 then propelled Allegri's men into third at Inter's expense, but Stramaccioni does not believe Sunday's game will be decisive, whatever happens.
"Absolutely not," he added. "Whether it's a good result or a bad result, whether we win or lose the derby, it will shake us out of our current inertia.
"In any case there are a lot of games left to play in the league and this season has taught us not to underestimate anybody."
Milan midfielder Antonio Nocerino returns to contention after missing out against Barca but striker Giampaolo Pazzini will not feature after suffering a knee injury in midweek.
Inter lost defender Andrea Ranocchia when the Italy international pulled up during the victory in Cluj, with winger Alvaro Pereira set to serve a one-match suspension.