The strategy included coordinated rebel advances in recent days from three directions: Misurata and Brega to the east, the refinery city of Zawiyah to the west, and the strategic southern approach to Tripoli at Gharyan. Retreating government troops allowed the rebel advance and provided clear targets for NATO airstrikes, the officials said.

As Gaddafi’s forces took up positions to defend the capital, “the targeting shifted toward Tripoli over the last four or five days . . . and the target set [in the capital] became larger,” said a senior NATO official, one of several alliance and U.S. officials who spoke on the condition of anonymity to discuss sensitive military and intelligence matters.

NATO said airstrikes had hit 22 targets in and around Tripoli on Saturday, with additional strikes Sunday. Most were carried out by NATO and allied aircraft, aided by six armed U.S. Predator drones and satellite imagery on the location and capabilities of government forces.

“We have a good operational picture of where forces are arrayed on the battlefield,” Marine Col. David Lapan, a Pentagon spokesman, said.

Once the rebels began arriving in force, government troops in much of the capital melted away. The rebels have reached “a clear tipping point in Tripoli, rather than a prolonged stalemate,” a senior European diplomat said.

“We are finishing quicker than I think many people were beginning to fear” we would, said the diplomat, referring to rising unease in NATO capitals this summer as the conflict began to drag into its sixth month.

Even as rebels seized control of large swaths of Tripoli, U.S. officials said it was unclear how long the fighting in the capital would continue and they expressed concern that loyalists could employ terror tactics in a final urban battle.

“There is still some fighting in the capital, but for the most part, the Libyan regime forces seem to have just not engaged,” a U.S. intelligence official said. “The challenge now is that you’ve got a city of 2 million, and we’re into urban warfare.”

The remaining questions, officials said, were Gaddafi’s location and the extent to which he retains the ability to control or communicate with his troops.

British, French and Qatari Special Forces have been operating on the ground in Libya for some time and helped the rebels develop and coordinate the pincer strategy, officials said. At the same time, CIA operatives inside the country — along with intercepted communications between Libyan government officials — provided a deeper understanding of how badly Gaddafi’s command structure had crumbled, according to U.S. officials.

The collapse could be traced to “two things,” a high-ranking U.S. military official said. “One was the knowledge that we had on the disintegration of the command structure of the Gaddafi forces.”

The rebels were emboldened by that information, officials said, gaining confidence that the war was turning in their direction.

“The second thing, in the lead-up into Tripoli, we really provided a lot of imagery on the locations of the Gaddafi forces,” the official said. “So as the rebels were getting into their positions when they came around the south and up into the west side of Tripoli, we had a good sense of where [Gaddafi’s] forces were at.”

That intelligence flow had been obstructed for most of the early months of the conflict, officials said, in part because of restrictions on the amount of information that could be given to NATO allies.

But the administration reached a decision about six weeks ago that enabled the sharing of more sensitive materials with NATO, including imagery and signals intercepts that could be provided to British and French Special Operations troops on the ground in addition to pilots in the air.

Although U.S. military officials were not in direct contact with rebel forces, the NATO allies and “particularly the Qataris” on the ground worked closely with the rebels’ military and political command “to help them think this one through and also provide them with the capabilities,” the NATO official said.

NATO, whose United Nations mandate is limited to the protection of Libyan civilians, has been anxious not to be seen acting as the rebel air force in a coordinated strategy. But the NATO official acknowledged that “the effect of what we were doing was not dissimilar. What we saw was sort of the collapse of the regime and its capability to direct its forces.”

The United States and its allies have also been keeping “a close eye on Libya’s chemical weapons stockpiles” since the conflict began, another U.S. official said. “Especially during this tumultuous time, maintaining vigilance on this issue is a priority.” The official noted that Gaddafi had previously destroyed many of his most dangerous weapons, and “much of what remains is outdated or difficult to make operational.”

But “we’re obviously now getting to the point of the ‘day after,’ ” the European diplomat said. While the collapse of order in Iraq after the U.S. invasion there “is in the back of everybody’s mind,” considerable stabilization planning has been done, he said.

A previously scheduled meeting Monday and Tuesday in Dubai, United Arab Emirates, among representatives of Libya’s opposition Transitional National Council and the allies has turned its attention to post-conflict security, including how to maintain a “viable police presence” and turn “some of the more ragtag” elements of the rebels into a proper security force, the diplomat said.

France has called for a meeting of the international contact group for Libya, consisting of a larger group of interested nations, to be held next week. Originally scheduled for mid-September, it “was going to be a run-of-the-mill meeting” until the events of last weekend, the European diplomat said.