(CNN) -- Wayne Rooney upstaged David Beckham as Manchester United claimed a 3-2 win against AC Milan in the first leg of the European giants' Champions League last-16 tie on Tuesday night.
Superstar Beckham was playing against his former club for the first time since leaving United in 2003, but England teammate Rooney scored twice as the visitors came from behind to clinch a famous first victory in the San Siro.
United led 2-1 when the 34-year-old Beckham was substituted in the 71st minute, and Rooney's second header soon after had United's fans feeling they were almost in the quarterfinals.
But a clever backheel from Beckham's replacement Clarence Seedorf gave the Italians hope, and United suffered a blow ahead of the second leg at Old Trafford on March 10 when England midfielder Michael Carrick was sent off in time added on, being booked for the second time for kicking the ball away.
Milan made a strong start to the match and Beckham, who started after being a substitute in his past two outings, was instrumental in Ronaldinho's third-minute opening goal.
United full-back Patrice Evra failed to clear the veteran midfielder's free-kick and Ronaldinho, left out of Brazil's latest international squad ahead of the World Cup finals, volleyed a shot which hit Carrick and beat wrong-footed goalkeeper Edwin Van Der Sar.
Milan dominated the opening half-hour as United obviously missed injured Serbia defender Nemanja Vidic, and striker Klaas-Jan Huntelaar flashed a shot just wide of the post after evading new England captain Rio Ferdinand.
United's luck turned soon after in the 36th minute as veteran midfielder Paul Scholes leveled with a fluky effort when he air-kicked at Darren Fletcher's right-wing cross, which hit his standing leg and squirmed past goalkeeper Dida, onto the post and into the net.
Beckham was unable to produce a trademark free-kick goal with his effort just before halftime curling well over the crossbar, while Van Der Sar did well to save from Ronaldinho after the break.
Rooney put the English champions ahead in the 66th minute with a looping header over Dida from a superb cross by substitute Antonio Valencia, who replaced the disappointing Nani.
It was the striker's 24th goal of the season, his best haul ever, and came in his 50th Champions League match.
Seedorf came on for Beckham but Rooney drifted away from the Milan defense in the 74th minute to glance Fletcher's well-flighted cross past Dida for 2-1.
Out of nowhere, Dutch veteran Seedorf stole into the box and flicked in Ronaldinho's 85th-minute cross, then Filippo Inzaghi and Thiago Silva squandered chances to level the score.
Carrick will miss the return leg due to his sending-off, with United having the advantage of scoring three vital away goals should the aggregate score end level.
Spanish giants Real Madrid, another of Beckham's former teams, suffered a 1-0 defeat away to French club Lyon in the first leg of their last-16 tie.
It was a good night for English clubs, with Premier League side Everton beating Portugal's Sporting Lisbon 2-1 in the first leg of their Europa League last-32 tie.
South Africa midfielder Steven Pienaar and French defender Sylvain Distin put Everton 2-0 up after 49 minutes.
But Distin was sent off in the final five minutes and Miguel Veloso scored from the resulting penalty to give his team hope ahead of the second leg on February 25.