The ongoing debate over minors’ access to contraceptives is testing the loyalty of groups traditionally among the biggest supporters of President Obama, who said Thursday he is “comfortable” with his administration’s efforts to find a middle ground on the issue.

Reproductive rights groups on Thursday lambasted the administration’s 11th-hour decision to appeal a federal ruling that would have made morning-after pill Plan B One-Step available to all ages without a prescription.

But conservatives cheered the move — an indication that traditional battles lines over contraception have blurred, at least for a few days.

The National Organization for Women, which praised Mr. Obama’s re-election in November as a “truly pivotal election,” said the Democratic president should have practiced what he preached during a speech last week before Planned Parenthood, when he promoted a woman’s right to make her own health decisions.

“It is deeply disappointing that the administration has chosen to pursue this appeal, refuting the judgment of the experts at the FDA, the American Academy of Pediatrics and commonsense,” said Ilyse Hogue, president of NARAL Pro-Choice America.

At issue is an April 5 order by U.S. District Court Judge Edward Korman in New York, who said Plan B One-Step should be available without age restrictions within 30 days.

The Justice Department announced late Wednesday it plans to appeal the order. It also requested an immediate stay of the judge’s ruling, which otherwise takes effect on Monday.

The government’s decision came one day after the FDA approved an application from the morning-after pill’s maker, Teva Women’s Health Inc., to let girls as young as 15 obtain the drug — one of the three types of emergency contraception — without a prescription. The current age limit is 17.

Mr. Obama, in Mexico on Thursday, said he was fine with the FDA’s move, citing scientific research, and with Health and Human Service Secretary Kathleen Sebelius’ decision to pursue some form of age restrictions in 2011, which Judge Korman criticized as an “obviously political” decision ahead of an election year.

“But I’m very comfortable with the decision they’ve made right now based on solid scientific evidence for girls 15 and older,” he told reporters while traveling in Mexico.

Tuesday’s decision to lower the age of access to 15 upset conservative groups, even if they now applaud the Justice Department’s decision to fight Judge Korman’s ruling.

Rep. Mark Meadows, North Carolina Republican, thanked the administration on Thursday for contesting the court’s order.

He was among 50 members of Congress who signed a letter last Friday urging the Obama administration to pursue the appeal. The letter was signed by some of the fiercest Republican opponents of Mr. Obama’s health care law — including Reps. Diane Black, of Tennessee, and John Fleming, of Louisiana, who held a press conference in March to unveil legislation that would repeal a part of the overhaul that requires many employers to insure contraceptives.

For months Mr. Obama has been attacked by Republican lawmakers and religious groups for failing to exempt faith-based nonprofits and religiously devout employers from the law’s contraception mandate, arguing morning-after pills like Plan B and ella amount to abortion.

Yet those who decried the requirement are supporting the Obama administration’s decision to fight a ruling that would allow young teenage girls to purchase morning-after pills at the neighborhood store.