“David has over-delivered on all of our expectations,” MLS Commissioner Don Garber said of David Beckham, above. (Harry How/GETTY IMAGES)

Sometime between 4 and 5 p.m. Pacific time Saturday, depending on whether the MLS Cup final between Los Angeles and Houston is decided in regulation or beyond, David Beckham will remove his No. 23 Galaxy jersey and disappear into Home Depot Center’s south tunnel for the last time.

If the rain holds off, the fading sun cuts at the perfect angle and the Galaxy repeats as champion amid supporters and celebrities, he and Major League Soccer will have their perfect Hollywood ending.

The English megastar is departing after six MLS seasons to seek one last challenge — in France? England? Australia? — during an extraordinary career that has carried a shy schoolboy from east London to the heights of global fame, from the pinnacles of European soccer to the foothills of American pro sports.

He will leave behind a league that, since his arrival, has grown to 19 teams from 12, set an attendance record this year, sprouted new stadiums like spring tulips and attracted additional international stars — many of whom, like Beckham, are beyond their prime but worthy of an audience.

Many factors contributed to MLS’s accomplishments, but by raising soccer’s profile, Beckham helped push them along.

“We needed David Beckham in 2007 to help drive our credibility, to help grow our popularity and to show the world [MLS] was ready to support a [top] league at the levels that it is around the world,” Commissioner Don Garber said. “I don’t believe we are going to be hurting when David leaves. David helped to get us to a point and we are going to take it from that point and go even higher and not look back.”

Beckham exits a league that created a rule for him, one that allows teams to exceed narrow salary guidelines in order to sign big-ticket talent and begin competing for players in the international marketplace. (It’s officially called the Designated Player rule, but really it’s the Beckham Rule.)

Beckham, 37, heads off having helped the Galaxy become an international brand — not to the extent of his former clubs, Manchester United and Real Madrid, or, for that matter, most European heavyweights, but one that brings credibility to a league unfamiliar to few beyond U.S. shores.

He didn’t win the MVP trophy in any of his six seasons, but in terms of his value to the league, he was without peer. Dashing and charismatic, he drew mainstream attention to the league, particularly among female admirers.

He sold Pepsi with Sofia Vergara, modeled underwear on billboards, chatted with Jay Leno and David Letterman, attended a royal wedding and promoted the Olympics. He was a celebrity who just happened to play soccer – a sport that, in this country, has produced more female than male players with off-field appeal.

Beckham took it all in stride, knowing he was as important selling the sport as he were playing it.

“Even when I stop for gas in Carson and people come up to me and they know nothing about the game and they’re like, ‘We’re coming to your game this weekend,’ ” he said. “So we’ve got support and interest from all different kinds of people and people that wouldn’t usually come to a soccer game, so I think it’s a special place at the moment.”

Beckham played both the hero and villain – a dual role unseen in the league’s first 11 years. The Galaxy drew sellout crowds everywhere it went – some cities moved games to larger stadiums to meet demand — but while the Beckham spectacle appealed to many fans, his outsize stardom brought out those wanting to see him fall.

And for a chunk of his MLS career, he did fall. Injuries undermined his wildly anticipated arrival in the summer of 2007 and the Galaxy, in turmoil on and off the field, failed to qualify for the playoffs during his first two seasons. “It wasn’t a great place to be,” he admitted.

The club’s fortunes improved, and Beckham found his stride, scoring goals on swerving free kicks and delivering pinpoint crosses. But he also began to turn off some of his own fans by seeming more interested in part-time spells with Italian club AC Milan and polishing his image than committing to the Galaxy and the dirty work of a long MLS season. During one loan, he tore an Achilles’ tendon and missed most of the 2010 campaign.

“I’ve played the villain quite a few times over my career, not just in the U.S.,” he said. “I’ve never been booed by my own fans with other clubs but I had that at a certain point here. I think we’ve won the fans [over] now and I think they’re very appreciative to what the team has done the last three or four years.”

Guided by Beckham, U.S. star Landon Donovan and Irish striker Robbie Keane, the Galaxy has advanced to three of the past four MLS championship games. Beckham enjoyed his finest campaign in 2011, notching almost as many assists (15) as he had the previous four seasons (16), and the Galaxy defeated Houston, 1-0, in the final.

This year he posted a personal MLS high for goals (seven) and, although the club stumbled for much of the year and finished fourth in the Western Conference, the Galaxy upset San Jose and defeated Seattle in the playoffs to earn a rematch with the Dynamo.

Even if Beckham doesn’t score Saturday, even if the Galaxy loses, L.A.’s supporters, Garber and the American soccer community will give thanks — for raising the profile of the game and serving as its fashionable ambassador.

Said Garber, “David has over-delivered on all of our expectations.”