Aaron Harris, Associated Press
MLS All-Stars' Kenny Cooper, foreground, competes for the ball against West Ham United FC's Joe Widdowson during the first half.

TORONTO — Chicago midfielder Cuauhtemoc Blanco scored one goal and helped set up another, and Houston midfielder Dwayne DeRosario snapped a tie with a penalty kick to give the MLS All-Stars a 3-2 victory over English Premier League team West Ham United 3-2 on Thursday night.

The All-Stars are unbeaten in five years against foreign opponents. Blanco was chosen as the game's most valuable player.

Forward Dean Ashton scored both goals for West Ham, which beat MLS' Columbus Crew 3-1 in an exhibition match on Sunday that was marred by a halftime brawl among more than 100 fans.

Los Angeles midfielder David Beckham played the entire game and earned an assist in his first MLS All-Star appearance. Beckham came close to scoring in the 40th minute, but his low free kick was headed away by West Ham defender Calum Davenport.

The England international had two more opportunities early in the second half, running onto a loose ball inside the 18-yard box but shooting high and just wide. He misses wide again on a free kick minutes later.

West Ham opened the scoring in the 26th minute when Carlton Cole's header sent Ashton in alone on goal. Ashton, who made his international debut for England last month, coolly fired a low shot past New England goalkeeper Matt Reis and into the bottom corner.

The lead was short-lived, as Beckham and Blanco teamed up to help the MLS All-Stars tie it one minute later. Blanco's clever back-heel on Beckham's pass from midfield sent Colorado midfielder Christian Gomez into the 18-yard box, and he scored with a low shot under West Ham goalkeeper Robert Green.

Blanco put the All-Stars in front 2-1 with a brilliant goal just before halftime. Dallas midfielder Juan Toja slid a short pass to Blanco, who eluded Scott Parker and curled a shot into a far corner, beyond Green's outstretched arms.

Ashton tied it at 2-all in the 68th minute when his long shot deflected off Kansas City defender Jimmy Conrad and past Reis.

Again, the MLS wasted little time in replying. Referee Mauricio Navarro pointed to the penalty spot after Lucas Neill brought down DeRosario inside the penalty box. With the record crowd of 20,844 roaring for the Toronto native, DeRosario blasted his shot off the underside of the crossbar. The ball then took a fortunate bounce into the back of the net.

West Ham's Luis Boa Morte almost tied it in the final minute of regular time, but shot wide.

DeRosario nearly added a second soon after, but Green dove to palm away his deflected free kick.

The MLS All-Stars beat Mexico's Guadalajara 3-1 in 2003 and, after returning to an East-West format in 2004, defeated English team Fulham 4-1 in 2005. They blanked England's Chelsea 1-0 in 2006 before beating Scotland's Celtic 2-0 last year.

West Ham defender Jonathan Spector, of Arlington Heights, Ill., missed the game because of recent hip surgery.