An anti-doping agency has issued a public warning to U.S. women’s soccer goalkeeper Hope Solo after she tested positive for a banned diuretic, a substance that she says she didn’t know was in premenstrual medication prescribed by her physician.

The U.S. Anti-Doping Agency says it accepts Solo’s explanation, and U.S. Soccer says the warning will not prevent its first-choice goalkeeper from competing in the 2012 Olympics or any other competition.

Solo, 30, tested positive for canrenone in a urine sample taken last month, the USADA said this week.

Canrenone is a diuretic, a type of substance that could help athletes pass drug tests by diluting their urine, according to the Mayo Clinic. Because of this, diuretics sometimes are referred to as masking agents.

An investigation determined that the diuretic was part of a prescribed medication she was taking under a doctor’s care, the USADA said.

“I took a medication prescribed by my personal doctor for pre-menstrual purposes that I did not know contained a diuretic,” Solo said in a statement released by U.S. Soccer. “Once informed of this fact, I immediately cooperated with USADA and shared with them everything they needed to properly conclude that I made an honest mistake, and that the medication did not enhance my performance in any way.

“As someone who believes in clean sport, I am glad to have worked with USADA to resolve this matter and I look forward to representing my country at the 2012 Olympic Games in London.”

U.S. Soccer said it “fully supports” Solo’s clarification that the positive test was “not related to performance enhancement in any way.”

“We fully cooperated with USADA during the disciplinary process to ensure it could be resolved quickly. Hope has accepted the public warning for her rule violation,” U.S. Soccer said.

Solo and the rest of the U.S. women’s soccer team are expected to begin training in the United Kingdom this week, ahead of this month’s Olympic Games. The team will begin with a match against France on July 25, two days before the games’ opening ceremonies, in Glasgow, Scotland.