A federal judge ordered the Food and Drug Administration on Monday to make the Plan B morning-after birth control pill available without prescription to women as young as 17.

The judge ruled that the agency had improperly bowed to political pressure from the Bush administration in 2006 when it set 18 as the age limit.

The agency has 30 days to comply with the order, in which the judge also urged the agency to consider removing all restrictions on over-the-counter sales of Plan B. The drug consists of two pills that prevent conception if taken within 72 hours of sexual intercourse.

Some women’s health advocates hailed the decision.

“It is a complete vindication of the argument that reproductive rights advocates have been making for years, that in the Bush administration it was politics, not science, driving decisions around women’s health,” said Nancy Northup, president of the Center for Reproductive Rights, the attorneys for the plaintiff in the suit against the F.D.A.