WASHINGTON D.C. (WCCO) — A federal judge has made a ruling on the so-called morning after pill, saying the government must make it available over the counter — for girls of all ages.

Currently only women 17 years and older can buy the pill without a prescription. The emergency contraception can prevent pregnancy if taken three days after sex.

READ MORE: Juvenile In Custody After Allegedly Shooting Minneapolis School Bus Window With BB Gun

The decision comes after reproductive rights groups filed suit to remove the age restrictions. In the judge’s ruling, he called the Food and Drug Administration’s decision to refuse the drop the restrictions “arbitrary and unreasonable.”

The FDA had wanted the contraception available to all ages.

READ MORE: 'I’m Going To Donate It All': 5-Year-Old Sells His Pumpkins To Raise Money For Others

But in 2011 the Obama administration overruled the recommendation, concerned adolescent girls would not know how to use the pill properly.

In his ruling, the judge called the contraceptive one of the safest sold over the counter and says the number of 11-year-old girls likely to use it is minuscule.

MORE NEWS: 1 Dead In Fatal Polk County Car Crash

The judge gave the FDA 30 days to make the change. Currently, women who buy the pill must present identification to a pharmacist.