The Justice Department had been fighting to prevent that outcome, but said late Monday afternoon that it would accept its losses in recent court rulings and begin putting into effect a judge’s order to have the Food and Drug Administration certify the drug for nonprescription use. In a letter to Judge Edward R. Korman of the United States District Court for the Eastern District of New York, the administration said it would comply with his demands.

The Justice Department appears to have concluded that it might lose its case with the appeals court and would have to decide whether to appeal to the Supreme Court. That would drastically elevate the debate over the politically delicate issue for Mr. Obama.

President Obama reportedly said, regarding this fight, that the idea of making such drugs available without a prescription for children of all ages made him uncomfortable—largely because he has two young daughters. A judge, however, suggested the administration was playing politics.