Michael Phelps
Michael Phelps has decided to take a break from swimmingReuters

Olympic legend Michael Phelps has put his swimming career on hold and joined a six-week comprehensive programme after he was arrested for DUI last week.

The 29-year-old American, who has earned a record 22 Olympic medals including 18 golds, announced in a series of tweets that he would stay away from swimming for a while to attend the programme.

"The past few days have been extremely difficult. I recognize that this is not my first lapse in judgment, and I am extremely disappointed with myself. I'm going to take some time away to attend a program that will provide the help I need to better understand myself," Phelps wrote.

"Swimming is a major part of my life, but right now I need to focus my attention on me as an individual, and do the necessary work to learn from this experience and make better decisions in the future."

Phelps will now miss the first US Grand Prix, which is scheduled to start on 20 November, but may make it to the remaining five Grand Prix meets to be held next year.

Phelps was arrested on Tuesday and charged with DUI, excessive speeding and crossing double lane lines. He was caught driving at 84 mph in a 45 mph speed limit zone and failed two sobriety tests, while giving up on the third after he was pulled over by the police. His blood-alcohol level was reported to be way higher than the permissible limit with 0.14 percent against the legal limit of 0.08.

"Earlier this morning, I was arrested and charged with DUI, excessive speeding and crossing double lane lines. I understand the severity of my actions and take full responsibility. I know these words may not mean much right now but I am deeply sorry to everyone I have let down," Phelps tweeted on Tuesday.

The swimmer was previously charged with drunken driving in 2004. He pleaded guilty to the charges and was sentenced to 18 months on probation and a fine but was not convicted as a first-time offender.

However, Phelps could now be sentenced up to a year in jail, pay a fine of $1,000 and his driving license could be suspended for six months if convicted. His trial is scheduled for 19 November.