David Beckham attracts a crowd in Thursday's MLS all-star game at Toronto. ((Aaron Harris/Canadian Press))

On a night when all the focus was on David Beckham, it was Canadian Dwayne De Rosario who stole the show at Major League Soccer's all-star game.

The Houston Dynamo midfielder emerged as the hometown hero after he scored the winning goal in the 69th minute to lift the MLS all-star team to a 3-2 win over English Premier League club West Ham United Thursday night in Toronto.

With the game tied 2-2, De Rosario, from Scarborough, Ont., was tackled from behind after bursting into the West Ham box and then converted from the penalty spot by slamming a powerful shot off the underside of the crossbar and into the back of the net.

"Man, what a great feeling. I couldn't ask for anything more," De Rosario said. "Scoring in my hometown in a game of thisimportance, it'sa dream cometrue for me."

Beckham, a star midfielder with the Los Angeles Galaxy, put in a solid but unspectacular performance in his MLS debut in Toronto before a sellout crowd of 20,844 fans at BMO Field.

The Chicago Fire's Cuauhtemoc Blanco, who scored one goal and set up another, was named the game's most valuable player.

"He deserves the award he's won tonight because he worked hard. He scored a goal and tried different things on the field and that's what soccer's all about," Beckham said of Blanco.

Thursday's game had a distinctive Canadian flavour thanks to the presence of Toronto FC defender Jim Brennan, a Toronto native, De Rosario and Houston goalkeeper Pat Onstad, from Vancouver.

"I didn't have a lot shots at me. I thought the defenders in front of me were fantastic," said Onstad, who along with De Rosario played in a MLS regular-season game for Houston in Washington, D.C., on Wednesday night.

The Canadians started on the bench before coming on as second-half substitutes.

'We Want Brennan'

The opening 20 minutes were dull and dour, marred by errant passes and plenty of sloppy play from both sides.

It didn't take the fans long to get restless and they let everyone know when they started a thunderous "We want Brennan" chant.

"That's something that I will always remember," admitted Brennan.

Neither team even had a sniff of goal, but suddenly the game came to life midway through the half. West Ham's Carlton Cole took advantage of some slack defending by feeding an exquisite pass to Dean Ashton who beat New England Revolution goalkeeper Matt Reis with a perfect finish in the 26th minute.

It took the all-stars less than a minute to equalize, their first goal coming when Blanco delivered a gorgeous back heel pass to Colorado Rapids midfielder Christian Gomez, who powered the ball home.

The game settled back down into its familiar groove before the MLS team won a free kick about 10 yards outside of the box.

The stage was set for Beckham, and this was the moment the fans had waited for. The Englishman lined up the ball and prepared to deliver one of his famous bending free kicks, but his attempt on goal hit a West Ham defender and was played out of danger.

Blanco inspires all-stars

The game desperately needed a moment of inspiration and Blanco provided it just before halftime. The Mexican took a short pass from FC Dallas's Juan Toja, slickly sidestepped a West Ham defender, and bent a curling shot into the far corner of the net.

Brennan and De Rosario were introduced in the 59th minute, much to the delight of the Toronto crowd, but it was Beckham who brought the fans to their feet after his sublime free kick just whispered past the post.

Ashton tied things up shortly after with a fluke goal, his long-range effort deflecting off Kansas City Wizards defender Jimmy Conrad.

De Rosario took matters into his own hands just two minutes later, powering into the penalty area and forcing a rash challenge from West Ham defender Lucas Neill to draw the foul. The Canadian calmly stepped up to the penalty spot and blasted his shot in off the crossbar.

The MLS all-stars are undefeated in five games against international opponents, having previously defeated Mexico's Club Deportivo Guadalajara (2003), English clubs Fulham and Chelsea (2005 and 2006) and Scottish outfit Celtic FC (2007).

"People don't realize how important this game is for MLS," De Rosario said. "This was another good example of the talent in this league."

The English and American national anthems were played before the teams took the field. After briefly booing "The Star-Spangled Banner," the crowd sung an impromptu version of "O Canada" before the Canadian anthem was performed live after both teams took to the field.

Next year's all-star game will be held in Salt Lake City.