CARSON, Calif. — A year after Landon Donovan returned to soccer, he realized he had lost his passion for the sport again. This time the best player in American history decided to walk away for good.

Donovan, 32, announced Thursday he will retire from pro soccer at the end of the MLS season, wrapping up the most prolific career in the league’s history with one last run at a championship with the Los Angeles Galaxy.

“I think for the last few years I haven’t had the same passion that I had previously in my career,” Donovan said. “To some extent I had felt obligated to keep playing. … It’s time to enjoy the rest of the season, and there would be no better way than to go out as a champion.”

Donovan is the top goal-scorer in MLS history and the top scorer in U.S. national team history, excelling as a forward and a midfielder. He was even named the most valuable player of his 14th MLS All-Star game on Wednesday night in Portland, Oregon scoring in the 2-1 win over Bayern Munich.

“All I could think is that if everyone only knew,” Donovan said.

Donovan, a five-time MLS champion with the Galaxy and the San Jose Earthquakes, made his retirement announcement on the same stage where he agreed to a multiyear contract extension with the Galaxy just a year ago.

He took several months off following the Galaxy’s second straight MLS Cup title alongside now-retired David Beckham in December 2012. Donovan traveled extensively during his time off and plans to see even more of the world after his career.

“It gets me excited thinking about it,” Donovan said. “For 16 years, almost every decision I’ve made, every hour of every day, has revolved around, ‘How is this going to prepare me for tomorrow’s training session or tomorrow’s game?’ Just having the freedom to do whatever you want is exciting.”

Donovan said his decision wasn’t spurred by his omission from his fourth U.S. World Cup team this summer. He was surprised and disappointed by Coach Jurgen Klinsmann’s decision, feeling he had done enough in camp to warrant inclusion.

“I certainly wasn’t going to allow one person’s poor choice this summer to affect a decision like this,” Donovan said.

Donovan, the career U.S. leader with 57 international goals over 156 appearances, has five World Cup goals, including a famed stoppage-time goal against Algeria in 2010 to send the U.S. to the second round.