LONDON - David Beckham is retiring from soccer, ending a career in which he transcended the sport with forays into fashion and a marriage to a pop star that made him a global celebrity.

The 38-year-old former England captain, who recently won a league title in a fourth country with Paris Saint-Germain, said yesterday he will retire after the season.

"It's a good way to go out," Beckham said in Paris. "It's every athlete's dream, every footballer's dream to go out on the top - on top form or winning a trophy . . . leaving as a champion."

Beckham, whose curling free kicks and pinpoint crosses became his signature as a player, has two more matches left at PSG against Brest tomorrow and at Lorient on May 26. He has been giving his salary to a children's charity.

Asked what led to his decision, Beckham replied with a laugh: "Probably when [Lionel] Messi was running past me in that home game," referring to PSG's Champions League match against Barcelona last month.

Beckham started his career with Manchester United and also played for Real Madrid and the Los Angeles Galaxy, winning titles with all those clubs and also making a record 115 international appearances for an England outfield player.

FIFA president Sepp Blatter described the midfielder as "one of the most iconic figures in global football."

"It's the end of a chapter of an amazing story," Blatter wrote on Twitter. "David grew up as a football loving child & achieved his dreams, and unquestionably inspired millions of boys & girls to try & do the same.

"Whatever he chooses to do next I'm sure he'll approach with the same dedication & good grace he displayed the last 21 years."

Beckham's fame went beyond the field, with his haircuts and clothing scrutinized as often as his play, earning him a string of lucrative sponsorship deals.

"Sometimes that has overshadowed what I have done on the pitch or what I have achieved on the pitch," Beckham said in a television interview conducted by former United teammate Gary Neville. "And as much as I say that doesn't hurt me, of course, it does.

"I am a footballer that has played for some of the biggest clubs in the world and played with some of the best players in the world, played under some of the biggest and best managers and achieved almost everything in football."

Beckham was even immortalized on the silver screen in the 2002 film "Bend it Like Beckham," which told the story of a British teenage girl of South Asian heritage struggling with family pressures and cultural expectations to play the sport she loves.

Beckham's retirement led to a flood of tweets dubbing the day "End it Like Beckham."

"If you had told me as a young boy I would have played for and won trophies with my boyhood club Manchester United, proudly captained and played for my country over one hundred times and lined up for some of the biggest clubs in the world, I would have told you it was a fantasy," said Beckham, who also played on loan at AC Milan. "I'm fortunate to have realized those dreams."