David Beckham capped a joyful day at Old Trafford with Manchester United Legends’ last goal in a 5-0 rout of Bayern Munich Legends, as Sir Alex Ferguson made his return to the dugout at Old Trafford on the 20th anniversary of winning the treble.

Ferguson’s appearance, after suffering a brain haemorrhage last year, was the highlight for a packed stadium as they were treated to 10 of the eleven starters from that night in Barcelona in 1999, with only Ryan Giggs unable to attend, leaving Paul Scholes to take his spot after being suspended 20 years ago.

Ole Gunnar Solskjaer, the current manager and hero in that dramatic Champions League final win over Bayern, came off the bench to score the opening goal, and Dwight Yorke, Nicky Butt and Louis Saha all scored before Beckham’s late fifth.

United’s younger legs told through the game, with Paul Scholes particularly influential in midfield and Gary Neville proving an energetic foil for Beckham on the right in a throwback to their heyday. Bayern’s team included Sammy Kuffour, who famously thrashed the Nou Camp turf in despair after Solskjaer’s winner, and was led by West Germany’s World Cup winning captain in 1990, Lothar Matthaus.

The money raised from the occasion will go to the Manchester United Foundation, which works with disadvantaged young people in the city. ”It’s for a good cause,” Ferguson said afterwards. “The Manchester United Foundation do tremendous work in Manchester today.

Sir Alex Ferguson chats to Dwight Yorke before kick-off (Getty)