President Barack Obama’s administration on Wednesday angered allies in women’s groups by appealing a judge’s ruling that the morning-after pill must be available over the counter to girls of all ages.

The administration has argued that the pill should not be readily available to young teens, so the appeal is consistent with that position.

But the legal move is certain to reignite controversy over emergency contraception at a time when Obama is trying to focus on other aspects of his agenda, including a sweeping overhaul of immigration laws

It also puts the president at odds with parts of his base.