Now that's a Hollywood ending worthy of a star.
Beckham wrapped up his MLS career as a two-time champion Saturday, with Landon Donovan's tiebreaking goal on a penalty kick in the 65th minute propelling the Galaxy to a 3-1 victory over the Houston Dynamo in the MLS Cup.
Omar Gonzalez tied it in the 61st minute with a long header for the Galaxy, who defended their title in a rematch of last season's championship game. For the second straight year, Beckham raised a trophy that stands as evidence of the 37-year-old English midfielder's indelible impact on American soccer during his six seasons in Los Angeles.
"It's been a successful six years here, and now that we've won the second one, it's even more satisfying," Beckham said. "I just hope people have enjoyed me playing here. It's what I always hope for when I step on the field."
With a stirring second-half surge capped by Robbie Keane's goal on another penalty kick in injury time, Los Angeles won its fourth MLS Cup, tying D.C. United for the league record.
The Galaxy also gave an appropriate farewell to Beckham, who will play elsewhere in the new year before eventually returning to MLS as a team owner. With rumours linking him everywhere from Sydney to Paris, he hasn't disclosed his immediate plans beyond a Christmas vacation back home in England.
Los Angeles will miss Beckham, but the glamorous global icon is going out at an apex for MLS' highest-profile franchise.
"I just hope I've brought a bit of interest to the game (in America)," Beckham said. "If that's the single thing I've done, then great. But I think the foundations are there now in this league. It's a 17-year-old league, and the foundations are great. It will continue to grow."
After Calen Carr put Houston ahead in the 44th minute, Beckham and his high-scoring teammates systematically broke down the defence of the Dynamo, who lost the MLS Cup 1-0 to Los Angeles on the same field last year.
While Gonzalez got the equalizer on a cagey play by MLS' top defender last season, Keane played another stellar attacking game for Los Angeles before earning his own penalty kick when Houston's Tally Hall knocked him down in the box.
Donovan redeemed himself for missing an open net in the 13th minute by burying his penalty kick after a handball in the box by Houston's Ricardo Clark. The U.S. national team star, who is also contemplating a departure from soccer, won his record-tying fifth MLS title while scoring his fifth career MLS Cup goal and the record 22nd goal of his post-season career.
"It's a little surreal," Donovan said. "In any sport, to repeat is really hard to do. ... For me personally, this felt more satisfying (than last year). We could enjoy it a little bit more."
After Keane's goal clinched it, Beckham left the game to a raucous standing ovation from the packed stadium amid chants of "Thank you, David!"
Beckham hugged Galaxy coach Bruce Arena, who won his fourth MLS title, and just about everybody on the Galaxy bench before the game ended moments later.
Beckham streamed onto the field with his teammates and waved thanks at the fans before he was joined by his three sons, all clad in No. 23 Galaxy jerseys.
"Today was always going to be an emotional day for myself, win or lose," said Beckham, who also won trophies in his final seasons at Real Madrid and Manchester United. "Coming off was tough, but I enjoyed the win today."
The pregame rain cleared long enough for MLS' sunny farewell to Beckham, who arrived in Los Angeles in 2007 from Real with designs on changing the American perception of the world's most popular game. The league has grown steadily during his tenure, with most MLS franchises on sound financial footing and in excellent stadiums, although the sport's popularity and TV ratings haven't matched the other American pastimes.
Beckham was wildly cheered by many of the same diehard Galaxy supporters who booed him three years ago after his loans to AC Milan and an injury-riddled start to his Galaxy career. The Home Depot Center souvenir stands were loaded with Beckham shirts, including one that said "Take Me With You!"
These two franchises have combined to win eight of the last 12 MLS titles, dating back to the Dynamo's days in San Jose. Houston seems stuck as a supporting player in the Galaxy's story, despite its rally from the Eastern Conference's last playoff seed to the championship match.
"You have to be proud of what we've accomplished once again," Houston captain Brad Davis said. "It isn't easy to get to this game, and this is the fourth time in seven years. It's a credit to this group of guys."
After winning the title last year on a Beckham-to-Keane-to-Donovan beauty of a goal, Los Angeles nearly had another storybook score in the 13th minute when Beckham launched a long, high pass to a sprinting Keane, who slipped behind the defence and centred it perfectly for Donovan.
But he inexplicably pushed his shot inches wide of the post, leaving him with both hands on his head while the stadium released the usual post-goal confetti anyway.
"When you're in a moment like that, you feel like you let the team down," Donovan said. "Candidly, it sat with me until halftime. I took a few minutes at halftime, sort of collected myself, and tried to stay present, because you can't change it."
The Dynamo improved their pressure late in the first half, and Adam Moffat's long pass eventually set up Carr's impressive near-post goal past Josh Saunders.
Carr leaped the corner flag in celebration of a rare score for the forward, a Bay Area native who joined the Dynamo last season and managed just four goals this year.
But with Keane and Beckham leading the second-half charge, the Galaxy finally broke through when Gonzalez stuck around the box after a failed setpiece and managed to bounce a looping header past Hall. Gonzalez's delayed return from injury this season sparked the Galaxy's late-season surge.
"At the beginning of the season, I didn't see myself getting back to this level," said Gonzalez, named the game's MVP.
Clark was then called for a handball in the box in the 65th minute after an extended defensive scramble by the Dynamo. It was another high-profile mistake by the U.S. national team player whose turnover led to Ghana's first goal in the Americans' 2-1 elimination loss at the World Cup two years ago.
"When the penalty came, I'm not going to fool anyone and say I was calm about it," Donovan said. "I was pretty nervous. But you have to keep going, and every one of these guys said, 'Forget about it. Keep going.'"
After Donovan scored, Houston frantically pressed for an equalizer in the final minutes, but Saunders and his defence repeatedly denied the Dynamo. After Hall wrapped his hand around Keane's thigh to stop a chance in the box, Keane confidently ended it with his sixth goal of a spectacular six-game playoff run in the Irish national team captain's first full MLS season.
"Being successful doesn't come easy," Beckham said. "You have to work at it. I tell my children every single day that if you want to be successful, it's hard graft. It doesn't come easy, and I think we proved that this year."