WASHINGTON (CBSMiami) – A federal judge ruled Friday that the so-called “morning after pills” must be sold over the counter at pharmacies without any age restrictions.

The ruling came from U.S. District Judge Edward Korman in New York and came about due to a lawsuit brought by reproductive rights groups. The groups had sued after the Department of Health & Human Services restricted over-the-counter access to morning after pills to people over 17.

READ MORE: Celtics run past Heat 93-80, move 1 win from NBA Finals

The judge ruled that HHS Secretary Kathleen Sebelius “failed to offer a coherent justification” for restricting the sale of emergency contraceptives, according to Politico.com.

READ MORE: South Florida family knows firsthand effects of nationwide baby formula shortage

Politico reported Judge Korman called Sebelius’ initial morning after pill ruling, “politically motivated, scientifically unjustified, and contrary to agency precedent.”

MORE NEWS: South Florida woman's bout with COVID included hair loss: 'This isn’t normal shedding'