Olympic swimming great Michael Phelps said Sunday he is "taking some time away" from swimming and will "attend a program that will provide the help I need to better understand myself" after his arrest for driving under the influence in Baltimore last week.

Phelps announced his intentions in a series of tweets Sunday. He registered a .14 percent on a Breathalyzer test after he was stopped on a speeding violation last week, the second time he has been charged with a DUI in Maryland.

The past few days have been extremely difficult. — Michael Phelps (@MichaelPhelps) October 5, 2014

I recognize that this is not my first lapse in judgment, and I am extremely disappointed with myself. — Michael Phelps (@MichaelPhelps) October 5, 2014

I'm going to take some time away to attend a program that will provide the help I need to better understand myself. — Michael Phelps (@MichaelPhelps) October 5, 2014

Swimming is a major part of my life, but right now I need to focus my attention on me as an individual, — Michael Phelps (@MichaelPhelps) October 5, 2014

and do the necessary work to learn from this experience and make better decisions in the future. — Michael Phelps (@MichaelPhelps) October 5, 2014

Phelps, 29, was charged last Tuesday with driving under the influence, excessive speed and crossing double lane lines in the Fort McHenry Tunnel on Interstate 95 in his native Baltimore, according to the Maryland Transportation Authority. His trial is scheduled for Nov. 19.

Phelps is the most decorated Olympian of all time with 22 Olympic medals, including 18 gold.

According to his representatives at Octagon, Phelps entered an in-patient program that will keep him from competing at least through mid-November, though there's no indication he plans to give up swimming.

A statement from Octagon said Phelps was entering "a comprehensive program that will help him focus on all of his life experiences and identify areas of need for long-term personal growth and development."

"Michael takes this matter seriously and intends to share his learning experiences with others in the future," the statement said.

Chuck Wielgus, the executive director of USA Swimming, praised Phelps for entering a program.

The governing body suspended him for three months in 2009 after a photo emerged showing Phelps using a marijuana pipe, even though he was not charged. USA Swimming has not taken any disciplinary action for his second DUI arrest.

"We fully support Michael's decision to place his health and well-being as the number one priority,'' Wielgus said. "His self-recognition and commitment to get help exhibit how serious he is to learn from this experience.''

Phelps retired after the 2012 London Olympics, but made a comeback to competition in April and won three gold medals while representing the United States' team in last month's Pan Pacific championships.

While Phelps was still working out his schedule for the upcoming year, he will surely miss the first U.S. Grand Prix meet at Minneapolis, which begins Nov. 20. The remaining five Grand Prix meets are all in the first half of 2015 -- important steps in the lead-up to next summer's world championships in Russia.

Phelps has already qualified for the worlds, the most important meet on the swimming calendar outside of the Olympics. He was not planning to compete in the short course world championships, which will be held in early December in Qatar. The U.S. team for that meet, which includes longtime Phelps rival Ryan Lochte, was announced last week.

Phelps also was charged with DUI in 2004 on the Eastern Shore of Maryland, and he received 18 months' probation and a $250 fine. Phelps also was required to deliver a presentation on alcohol awareness to students at three high schools.

The conviction in that case was waived, which means Phelps this time faces the same penalties a first-time offender would. If convicted of the latest charges, he faces up to one year in jail, a $1,000 fine and the loss of his driver's license for six months.

The Associated Press contributed to this report.