The 37-year-old English midfielder exited MLS on a high note as Los Angeles won its second straight title with a 3-1 win over Houston.

CARSON, Calif. — David Beckham stood on the podium with his three sons and an oversized Union Jack knotted around his Los Angeles Galaxy jersey. With a practiced lift and a broad smile, he raised the silver cup over his head to a raucous ovation amid a confetti blizzard.

It was 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 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, which defended its title in a rematch of last season’s MLS Cup. For the second straight year, Beckham raised a trophy that stands as evidence of the 37-year-old English star’s indelible impact on American soccer during his six seasons in Los Angeles.

    Most Read Stories

“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, Los Angeles won its fourth MLS Cup, tying D.C. United for most in the league.

After Calen Carr put Houston ahead in the 44th minute, Beckham and his high-scoring teammates systematically broke down the defense of the Dynamo, which lost the MLS Cup 1-0 to Los Angeles on the same field last year.

Gonzalez got the equalizer on a looping header following a failed set piece in the 60th minute, and moments later Donovan redeemed himself for missing an open net in the 13th minute by burying his penalty kick after a Houston handball in the box. Donovan, who is also contemplating a departure from soccer, won his record-tying fifth MLS title while scoring the record 22nd goal of his postseason 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.”

Robbie Keane finished another stellar attacking game by earning his own penalty kick when Houston’s Tally Hall knocked him down in the box in stoppage time.