Brussels - An acrobatic bicycle kick from France international Philippe Mexes helped AC Milan qualify for the Champions League last 16 with a 3-1 defeat of ten-man Anderlecht on Wednesday.
With Group C winners Malaga held 2-2 at Zenit St Petersburg earlier, both sides were desperate for all three points to secure the runners-up spot with one group game to spare.
And it is Milan who progress, after Stephan El Shaarawy put the Serie A side into a 47th-minute lead with Mexes adding Milan's second in the 71st minute.
Tom De Sutter pulled one back for Anderlecht but Milan held their nerve with Alexandre Pato grabbing a late third.
Milan coach Massimiliano Allegri told Sky Sport: "We've reached the first objective of the season (to qualify). It's a great reward for the boys, who deserve this.
"We were a bit imprecise in the first half because we were rushing our final pass.
"After the break it was better. Now we have to continue making progress.
"As for Mexes' goal, I thought the ball was going to fly out of the stadium! On top of that he played a good match."
With both teams needing the win to secure qualification, the first half was a cagey affair with Milan captain and keeper Christian Abbiati keeping out the only real chance.
In a one-on-one with Milan Jovanovic he did well to deny the Serbian striker's shot with his legs.
The second half was only two minutes old when El Shaarawy struck with Milan's first decent shot of the game.
The 20-year-old, author of both goals in his club's 2-2 Serie A draw with Napoli at the weekend, calmly controlled Mattia De Sciglio's cross in the box to sidefoot the ball past Anderlecht keeper Silvio Proto.
Anderlecht were a man down in the 70th minute when Bram Nuytinck got his marching orders for bringing down Pato as the last man.
Ricardo Montolivo took the subsequent free-kick for Mexes to produce his moment of magic.
From just outside the box the Frenchman controlled the ball on his chest before unleashing his bicycle kick past Proto.
Second half substitute de Sutter then gave Anderlecht hope, tapping in from close range off a corner with 18 minutes remaining.
Pato rounded off the night for Milan in style with their injury-time third, the Brazilian slotting into an empty net after being set up by El Shaarawy.