San Jose’s Chris Wondolowski, MLS’s leading scorer, goes down in a heap along with Chelsea’s John Terry following a first-half collision. Wondolowski scored the game’s first goal in the 21st minute. (Jeff Zelevansky/Getty Images)

Major League Soccer has been doing its all-star game in the right way for years now by pitting a league squad against a prominent international club. It’s a big soccer world out there, so why limit the midsummer show to in-house performers?

The problem the previous two seasons: Even in rusty form, the visiting titans were too much for an MLS crew with two days of practice and no chemistry. The results were hideous.

This year, however, MLS provided the complete package, defeating European champion Chelsea, 3-2, Wednesday in front of 19,236 at sold-out PPL Park.

“We know MLS is on stage, and every time we play, people are interested in how the MLS is doing,” said D.C. United Coach Ben Olsen, who oversaw the league’s 19-man squad. “I thought they did the MLS proud.”

He was particularly proud of United’s players. Chris Pontius, the game’s most valuable player, scored a 73rd-minute equalizer, assisted by D.C. teammate Dwayne De Rosario. Seattle Sounders forward Eddie Johnson then struck a dramatic game-winner in stoppage time on a deflected shot.

In 2010 and ’11, MLS lost to Manchester United by a combined 9-2.

San Jose’s Chris Wondolowski, MLS’s leading scorer, scored in the 21st minute, but English national team veterans John Terry and Frank Lampard answered for the London-based Blues.

Pontius, who entered at the start of the second half, met De Rosario’s cross in stride for a 16-yard one-timer. With penalty kicks looming, Real Salt Lake’s Kyle Beckerman (Crofton, Md.) linked with Johnson, who utilized his speed to shift into space. He drove a low effort from beyond the box that caromed off defender David Luiz and floated over goalkeeper Ross Turnbull.

Pontius’s goal and award marked two additional milestones in his recovery from a broken leg late last season.

“I didn’t think I would be here,” said United’s top scorer with nine goals. “It’s been a long road. . . . To be able to get that goal against a team like Chelsea is very special.”

Reacting to Pontius’s goal, “I actually jumped off the bench,” Olsen said. “I was a little ashamed of myself. It was a great moment.”

The glamour event unfolded in front of a picturesque backdrop: The Philadelphia Union’s home sits at the base of the Commodore Barry Bridge. Trucks bound for New Jersey rumble high above the northwest corner of the stadium. From most seats, spectators see the lit span disappear into the darkness across the Delaware River.

Los Angeles Galaxy midfielder David Beckham arrived on the day of the match after doing promotional work in London ahead of the Olympics. After the game, he was scheduled to hop back across the Atlantic ahead of the Opening Ceremonies on Friday. In between private flights, he started on the right flank and played 74 minutes.

Roberto Di Matteo’s lineup featured three starters from the Champions League final against Bayern Munich. The most notable absence was the May 19 hero, Didier Drogba, who left Europe for riches in Shanghai. Several regulars slated to start the Premier League opener Aug. 19 at Wigan were rested, but any Chelsea unit is a formidable foe.

In the 21st minute, Landon Donovan sprayed the ball wide to Thierry Henry for a low cross into the heart of the penalty area. Terry’s off-balance effort lacked authority, allowing Wondolowski to pounce.

Terry redeemed himself 11 minutes later, nodding in Lampard’s corner kick. Chelsea claimed the lead in the 58th. A moment after Dan Kennedy made a superb save on Lampard’s low bid, the Chivas USA keeper waved at Ramires’s cross. Lampard was waiting on the backside for a one-timer.

Pontius and Johnson then lifted MLS to its first all-star victory since 2008.

“Benny’s a winner,” Johnson said of Olsen. “I’ve played against him, I’ve played with him. He held us to high expectations for this game.”