Substitute Pedro Leon scored deep into injury time to rescue a 2-2 draw for Real Madrid at AC Milan and send the Spanish team into the Champions League knock-out rounds. Gonzalo Higuain had given the Spaniards a deserved first half lead but a Filippo Inzaghi brace lit up an otherwise uninspired performance from the hosts. Leon's last gasp heroics saved Real coach Jose Mourinho from suffering defeat on his return to the San Siro, where he coached Inter Milan for two years. Real are through to the second round while Milan are now a point ahead of Ajax, who lost 2-1 at Auxerre. In a feisty start Madrid carried on from where they had left off in the Bernabeu, where they won 2-0, creating many scoring chances. Higuain had a low shot on just three minutes that Christian Abbiati tipped around the post while Pepe's downward header from Xabi Alonso's free-kick on nine minutes bounced up and over the bar. Milan's Kevin-Prince Boateng sent a volley too close to Iker Casillas and Alonso's speculative long-range volley went wide. Angel Di Maria got behind Milan's backline on 13 minutes but Gianluca Zambrotta battled away to put him off and the Argentine scuffed his shot wide. World Cup final referee Howard Webb had his hands full at times trying to keep a lid on a tetchy affair that almost spiralled out of control when Cristiano Ronaldo rolled around on the floor theatrically after contact with Ignazio Abate. Real came within inches of taking the lead on 20 minutes but Andrea Pirlo twice headed off the line, first from Higuain's header and then Di Maria's volleyed follow-up. Boateng played Ibrahimovic in one-on-one with Casillas but his weak shot from an angle hit the keeper's legs. After a brief lull, Ronaldinho clipped in Ibrahimovic on 37 minutes but his chip over Casillas went well wide. Abbiati spilled a fierce Alonso drive from distance before Real scored in the final minute of the half. Di Maria ran at the defence and slipped in Higuain as Alessandro Nesta tried to play offside but stepped up too late, allowing the Argentine to finish coolly from seven yards. It was more of the same after the break as Ronaldo stung Abbiati's hands with a rasping shot from distance. Milan were getting nowhere so coach Massimiliano Allegri sent on 37-year-old Inzaghi who immediately injected some passion into the side. And it was he who brought the home side level after a comedy of Real errors on 68 minutes. Pepe slipped when favourite to reach a Gennaro Gattuso through ball, allowing Ibrahimovic to run in on goal from the left, the Portuguese centre-half even tripping up team-mate Sergio Ramos when trying to do likewise to the big Swede. Ibrahimovic then slipped as he went to cross but Casillas had already committed himself to come out and as the ball went behind him, he let it slip through his hands, presenting Inzaghi with an easy header home from three yards. Ten minutes later, Inzaghi had repeated the trick following another Madrid defensive disaster as the master poacher was allowed to run onto a long Gattuso ball forward -- the defenders claiming in vain he was offside -- and slipping the ball under the advancing Casillas. But then Mourinho threw on Leon and deep into injury time fellow sub Karim Benzema slipped him in to shoot home between Abbiati's legs. 