For days President Obama had been hammered over a regulation in the 2010 healthcare law that required religiously affiliated hospitals, charities and universities to provide birth control coverage for their female employees even if that conflicted with church teachings.
On Friday he tried to end the debate with what he called an "accommodation." The employees still will be offered free birth control coverage. But the benefit will come directly from their insurers, and no religious groups' money will be used.
The question now is whether the maneuver will tamp down the political fire and allow Obama to refocus public attention and his reelection drive on the more favorable news coming from the economy.
He appeared to have made progress, winning over the Roman Catholic hospital association and Catholic Charities — although not the nation's bishops — and reassuring wavering Democrats while keeping the support of groups like Planned Parenthood.
Under the new plan, administration officials believe insurers will comply at no charge because the coverage may not actually cost them anything. Evidence suggests that providing birth control coverage reduces overall costs for health plans because birth control is much cheaper than pregnancy, according to administration officials and some health industry analysts.
The fact that the compromise had not been suggested earlier angered the president, who felt let down by his staff, officials said. Obama waded into the details of the dispute himself this week and personally crafted the solution, according to a Democratic official who spoke on condition of anonymity to discuss the sensitive matter.
From the beginning, the fight over the requirement that all health plans offer free birth control coverage was animated by politics, deeply held beliefs and the personalities of the people involved. Several prominent members of the president's team, including Health and Human Services Secretary Kathleen Sebelius and senior advisor Valerie Jarrett, argued strongly for Obama's commitment to make contraceptives available to all.
But since November, others in Obama's circle had issued warnings of political trouble ahead. That month, then-Chief of Staff William Daley, who is Catholic, asked Obama to sit down with New York Archbishop Timothy Dolan, head of the United States Conference of Catholic Bishops, to talk about the coming contraceptives mandate.
According to Democratic officials with knowledge of the talks, some policy experts and lawyers in the White House believed the administration should not compromise because no birth control mandate would win bishops' support.
Obama ultimately agreed with that position and signed off on the rule announced in late January, exempting churches and other houses of worship from the mandate but requiring religiously affiliated employers such as schools and hospitals to make sure their employees have contraceptive coverage.
But even as he made calls to Dolan and Sister Carol Keehan, the head of the Catholic Health Assn. of the United States, to explain the initial policy just before it was announced, Obama emphasized that changes could come during the year before the mandate takes effect.
The bishops responded angrily and publicly to the policy, putting the administration on the defensive. Republicans soon joined the chorus, as did some Catholic Democrats in Congress. As the fight grew louder and more threatening over the last week, Obama decided to move quickly to confront the problem, a senior administration official said.
Announcing the change Friday at the White House, Obama said he had always been sensitive to the concerns about religious liberty, telling reporters that "we live in a pluralistic society where we're not going to agree on every single issue or share every belief."
"That doesn't mean that we have to choose between individual liberty and basic fairness for all Americans," Obama said. "We are unique among nations for having been founded upon both these principles, and our obligation as citizens is to carry them forward. I have complete faith that we can do that."
His words quickly won the support he was looking for. "The framework developed has responded to the issues we identified that needed to be fixed," said Keehan, who supported Obama's effort to overhaul healthcare but had opposed the birth control mandate.
Obama also won over a range of prominent Catholics who had criticized the policy, including Douglas W. Kmiec, his former Malta ambassador, and E.J. Dionne, a columnist and senior fellow at the Brookings Institution.
Planned Parenthood announced its approval, as did NARAL Pro-Choice America.
Others remained opposed or on the sidelines. The bishops conference has not embraced the plan. A spokesman for America's Health Insurance Plans, the insurance industry's lobbying arm, expressed reservations about the proposal, while noting that health plans had long offered contraceptive coverage.
The policy shift also showed little sign of satisfying his toughest critics on the right. Republican presidential hopefuls made it clear they planned to keep the pressure on Obama, and an aide to House Speaker John A. Boehner (R-Ohio) said the House would pursue legislative measures to ensure there was no "attack on religious freedom."
But as supporters stepped back into his corner Friday, Obama felt empowered to turn the political spotlight back on his critics — and to issue a new appeal for support.
"I understand some folks in Washington may want to treat this as another political wedge issue, but it shouldn't be," he said. "I certainly never saw it that way.... Religious liberty will be protected, and a law that requires free preventive care will not discriminate against women."
Lisa Mascaro in the Washington bureau contributed to this report.