President Obama on Thursday endorsed his administration’s decision to let girls as young as 15 purchase the morning-after pill over the counter.

“I’m very comfortable with the decision [the Food and Drug Administration] made right now based on solid scientific evidence for girls 15 and older,” Obama said during a joint press conference with Mexican President Enrique Peña Nieto.

Obama previously said that all girls younger than 17 should have to get a prescription to purchase Plan B, lamenting the prospect of them buying the product “alongside bubble gum or batteries.”

At the same time, Obama backed his Justice Department’s appeal of a federal court ruling that would allow all girls to purchase the pill over the counter.

The president is taking heat from those on both sides of the debate. His liberal base condemned the Justice Department appeal, saying it undercut the president’s pledge to protect contraceptive rights. And conservatives are hammering Obama for not keeping restrictions in place for those younger than 17.

Obama insisted during the press conference Thursday that he played no role in either the FDA’s new rules or the Justice Department’s appeal.