After two weeks of playing down the prospect of military intervention in Libya, the Obama administration is on the brink of inserting itself into a third war in a Muslim nation — something the president, who has spent the first half of his term mending America’s relationship with Islam, had hoped to avoid.

The administration’s shift from skepticism to support for military intervention in Libya occurred over a frenetic week of war and diplomacy in Washington and Paris, at the United Nations and inside Libya, where facts on the ground changed swiftly.

Libya’s rebel forces dissolved far more quickly than administration officials had anticipated, despite warnings of their weakness from the director of national intelligence. In addition, the Arab League’s call for a U.N.-led military operation in Libya gave momentum to the administration’s search for international support, particularly by convincing some nations facing strong internal dissent of their own to act.

Inside an administration criticized for its cautious approach to the change sweeping the greater Middle East, the turning point came Tuesday evening when Obama, after returning from a dinner honoring combat commanders, reconvened his senior national security staff in the Situation Room.

Following a two-hour meeting, administration officials say, Obama directed his ambassador to the United Nations, Susan Rice, to seek Security Council approval for a resolution that would authorize military intervention beyond a no-fly zone after concluding that such a limited mission would not be enough to slow Libyan leader Moammar Gaddafi’s forces. The final resolution authorizes “all measures necessary” to protect civilians.

“What he said was, ‘If we’re really serious about supporting something that’s effective, we need to help shape a broader resolution in New York,’ ” said Ben Rhodes, the deputy national security adviser for strategic communications. “The president recognized the urgency of the situation, making the analytical point that we needed a broader concept.”

Obama’s decision to participate in military operations marks a victory for a faction of liberal interventionists within the administration, including Rice, Rhodes and National Security Council senior directors Samantha Power and Gayle Smith.

Some of them were shaped by U.S. inaction in Rwanda and the Balkans in the 1990s — as officials in previous administrations or as journalists — and saw in Libya’s civil conflict a moral imperative to prevent mass killings as Gaddafi retook rebel-held areas and threatened reprisal against those who did not surrender.

The internal divide

Among those most skeptical of another military commitment for over-stretched U.S. forces were Defense Secretary Robert M. Gates, National Security Adviser Thomas E. Donilon and his deputy, Denis R. McDonough, who are known within the administration as pragmatists highly protective of the president.

Those officials expressed concern that a no-fly option would be insufficient to push back Gaddafi and that carrying it out would probably be borne by the United States alone, something they wanted to avoid in a region where the United States is held in low regard.

Initially wary of military intervention, Secretary of State Hillary Rodham Clinton shifted her view after traveling in Europe and North Africa over the past week, seeing firsthand the international support for and willingness to participate in such a mission.

“This is the divide,” said a former administration official, who requested anonymity to discuss the internal White House debate. “It’s been a pretty central divide in the administration, between a kind of traditional, realpolitik definition of interests . . . and a view that, interestingly, is much more consistent with the forces that got Obama elected.”

In the early evening of March 9, the Principles Committee, comprising the most senior members of Obama’s national security team, adjourned after meeting on Libya.

Embattled rebels in the country’s east were calling for international help to protect them from Gaddafi’s intensifying aerial bombardment. But among senior administration officials there was little support for a no-fly zone, viewed by some as little more than a symbolic step in a conflict fought largely on the ground.

“At any time facts on the ground could change,” a White House official said at the time, “but the intelligence assessment now dispels the idea that a no-fly zone is the key here.”

Earlier in the month, Obama had declared that Gaddafi “must leave” after using violence to maintain his 41-year hold on power. But his critics and supporters alike wondered what, if anything, Obama intended to do beyond imposing financial sanctions to make that happen.

In testimony March 10 before the Senate Armed Services Committee, the director of national intelligence, James R. Clapper Jr., warned that “over the long-term . . . the regime would prevail.” Donilon called Clapper’s remarks “a static and one-dimensional assessment.”

Administration officials said Friday the criticism stemmed from fears that other nations would view Clapper’s comments as U.S. policy — that the administration had, in effect, accepted Gaddafi’s return. That perception, officials feared, could undermine the administration’s search for international support.

Two days later, though, the Arab League called on the United Nations to enforce a no-fly zone over Libya in an unprecedented rebuke of a member country.

Before the vote, the prospect of securing a U.N. resolution for military intervention seemed all but hopeless. Russia and China — each with a history of putting down internal dissent with violence — and Germany all opposed the measure.

‘Sense of urgency’

But the historic vote changed everything, and when Clinton arrived in Paris two days later to meet with foreign ministers from the Group of 8 nations and Russia, she found support building. Arab foreign ministers also pledged to participate, in some form, in a military operation.

While in Paris, Clinton also met for the first time with a senior representative of the Libyan opposition’s interim government, Mahmoud Jibril.

A U.S.-educated intellectual, Jibril “expressed a sense of urgency about the situation in both humanitarian and political terms,” said a senior administration official familiar with the discussions.

“We needed to understand who the people were in the council, what their goals are and what they sought in terms of an end game,” said a second administration source.

In the days leading up to the Arab League vote, Britain and France worked on a resolution that would authorize a no-fly zone. The United States, according to one Security Council diplomat, appeared “semi-detached.”

“We’re still trying to work out ourselves what was really happening with the United States,” the diplomat said, speaking on the condition of anonymity.

On Tuesday, Rice still appeared tentative in a closed Security Council session, questioning other council members about whether there would be Arab participation and suggesting a no-fly zone would not change the military balance on the ground.

“We had the feeling that they had no idea what their policy was going to be,” a second Security Council diplomat said.

But the following day, Rice signaled that the United States was prepared to take action.

By Thursday’s vote, at least two Arab governments appeared ready to participate in enforcing a no-fly zone, two administration officials said.

As Arab support grew, Russia and China found it increasingly hard to veto the resolution, the officials said. Both countries abstained from voting, as did Germany, India and Brazil, where Obama is traveling this weekend.

“I have taken this decision with the confidence that action is necessary,” Obama said Friday from the White House East Room, “and that we will not be acting alone.”

Staff writers Colum Lynch at the United Nations and Mary Beth Sheridan in Washington contributed to this report.