NEW YORK — President Barack Obama's administration can go forward with its new plan to make the morning-after pill available to buyers of any age without prescriptions, but it needs to do it promptly or face potential sanctions in the long-running dispute over access to the emergency contraceptives, a federal judge ruled Wednesday.

The finding by U.S. District Judge Edward Korman came in response to a Department of Justice decision this week to ditch rules barring over-the-counter sales to girls younger than 15 and comply with his April order to make the pills available to buyers of any age.

The judge gave the go-ahead on a plan to fast-track Food and Drug Administration approval of unrestricted sales of the Plan-B one-pill version of the drug, but not without once again blaming the FDA for bending to "unjustified political interference" and endlessly clinging to "legally and scientifically unjustified restrictions."

The legal effort to convert the drugs "from prescription to over-the-counter status has gone on over 12 years, even though they would be among the safest drugs available to children and adults on any drugstore shelf," the judge wrote.

An advocate for girls' and women's reproductive rights, Annie Tummino, the lead plaintiff in a lawsuit demanding broader access to the pill, reacted to the judge's memo with cautious optimism.

"The government needs to act now to put it on the shelf where women need it — at any convenience store, just like aspirin or condoms and at a price we can afford," Tummino said in a statement.

Department of Justice spokeswoman Allison Price declined to comment on the judge's decision.

The morning-after pill contains a higher dose of the female hormone progestin than is in regular birth control pills. Taking it within 72 hours of rape, condom failure or just forgetting regular contraception can cut the chances of pregnancy by up to 89 percent, but it works best within the first 24 hours. If a girl or woman already is pregnant, the pill, which prevents ovulation or fertilization of an egg, has no effect.

For the morning-after pill to be sold without age and other restrictions, manufacturer Teva Women's Health must submit an application to the FDA, which has said it "intends to approve it promptly." Teva hasn't said how quickly that might happen.

The FDA was preparing in 2011 to allow over-the-counter sales of the morning-after pill with no limits when Health and Human Services Secretary Kathleen Sebelius overruled her own scientists in an unprecedented move. White House officials have claimed that the FDA and the Department of Justice were acting independently of the White House in deciding how to proceed.

Despite the government's shift this week, the plaintiffs had complained to the judge that the new proposal still harmed girls and women by failing to lift restrictions on a cheaper, two-pill version of the drug. Their lawyers argued that the government couldn't prove that there was a difference between the one-pill and two-pill versions that would justify excluding one from their plan.

"My order, however, is clear that the defendants may limit over-the-counter approval to the one-pill product if they actually believe such a difference exits," the judge wrote. "On the assumption that the Commissioner of Food and Drugs entertains a good-faith belief that the products should be treated differently, the defendants' proposal is sufficient to comply with my order."

He noted that the government had committed to approving a revised application from Plan B's manufacturer without delay.

"If they fail to do so, the plaintiffs with have a remedy available," he wrote.