Updated

Four-time Olympic medalist Shawn Johnson of the United States sprang a major surprise on Sunday when she announced her retirement from competition due to recurring knee problems.

Johnson, who has also clinched three world championship medals, had been expected to be one of the leading contenders at this year's Olympic Games in London.

"Unfortunately, it has become obvious that my left knee is not able to sustain the demands of gymnastics any longer," the 22-year-old said in a statement released by USA Gymnastics.

"All I can do now is gracefully retire and thank everyone who has believed in me and my journey."

Johnson, who struck Olympic gold on the beam at the 2008 Beijing Games along with silver in the team, all-around and floor exercise competitions, had been on the comeback trail since 2011.

Though she has now abandoned her attempt to qualify for a second Olympics, she intends to help her compatriots as they prepare for the London Games.

"I still have the heart, drive and desire to compete and help the USA at the London Olympics," said Johnson, whose bubbly personality made her a huge favorite among the fans.

"Being given the opportunity again by (coach) Martha Karolyi and USA Gymnastics to represent the USA has been the greatest honor of this comeback."

Johnson started gymnastics in 1995 at the age of three and went on to claim three gold medals at the 2007 world championships in Rome - in the team, all-around and floor exercise competitions.

She had been expected to go home with a stash of gold medals from the Beijing Games but had to settle for one.

"Shawn has been an outstanding representative of USA Gymnastics throughout her career," USA Gymnastics chairman Peter Vidmar said.

"I have tremendous respect for Shawn's dedication and hard work during her return to gymnastics for a run at her second Olympics ... we also appreciate everything she has done as a role model and ambassador for our sport."

(Reporting by Mark Lamport-Stokes in Dublin, Ohio, editing Dave Thompson)