President Obama demanded Friday that the Libyan government move beyond its declaration of a cease-fire in response to a U.N. Security Council resolution and pull its troops back from cities recently captured from rebels.

Saying the terms were “non-negotiable,” Obama said at the White House that longtime Libyan leader Moammar Gaddafi “must stop his troops from advancing on Benghazi, pull them back from Ajdabiya, Misurata and Zawiyah, and establish water, electricity and gas supplies to all areas.” Forces loyal to Gaddafi have been closing in on the rebel capital of Benghazi, Libya’s second-largest city, after having already overrun Ajdabiya and Zawiyah. Loyalist forces also have been besieging Misurata on the Mediterranean coast 130 miles east of the capital, Tripoli.

Obama spoke after the Libyan government declared an immediate cease-fire Friday in a bid to head off Western military intervention on behalf of rebels seeking to overthrow Gaddafi, hours after the U.N. Security Council authorized a no-fly zone and the use of “all necessary measures” to protect civilians in Libya.

Despite the declaration, Gaddafi’s forces continued pummeling areas of eastern Libya with artillery and airstrikes well after the cease-fire was supposed to take effect. The attacks targeted the areas around Zuwaytinah and Ajdabiya, more than 90 miles south of Benghazi. Jets streaked across the sky firing at targets, at least one helicopter flew low across the desert, and artillery bombardment could be heard for several hours Friday afternoon around Zuwaytinah.

Residents and rebel officials said the assaults continued well after Gaddafi’s government announced a cease-fire Friday afternoon local time.

“Where is the international community?” screamed Mohammed al-Hadar, a rebel fighter. “They are still using airplanes to kill us.”

At least two bodies lay inside a pick-up truck that came from the direction of the fighting. The men appeared to be fighters.

Other fighters withdrawing from Zuwaytinah said Gaddafi’s forces had fired with heavy machine guns at civilians in cars fleeing Ajdabiya. Faraj al-Obeidi said he saw eight civilians, including women and children, who were killed trying to cross the front line by Gaddafi’s forces blocking the eastern entrance to Ajdabiya.

Obeidi said he and his comrades gathered the bodies and covered them with blankets and carpets. “At this moment, the airplanes started bombing and we fled,” said Obeidi. “Their bodies are still along the road.”

Rebel officials said Gaddafi’s forces had no intention of honoring the cease-fire. They said attacks also continued in the western towns of Misurata and Zintan well after the cease-fire was announced.

In his appearance at the White House, Obama stressed in a stern tone that the U.N. resolution’s conditions “must be met.” He said, “The United States, the United Kingdom, France and Arab states agreed that a cease-fire must be implemented immediately. That means all attacks against civilians must stop.”

He said the demands for the pull-back of Libyan troops “are not subject to negotiation.” And he warned that the U.N. resolution “will be enforced through military action” if Gaddafi does not comply.

Secretary of State Hillary Rodham Clinton is traveling to Paris on Saturday for a meeting with European partners about enforcement of the U.N. resolution, Obama announced.

He pledged that the United States will not deploy ground troops in Libya, “and we are not going to use force to go beyond a well-defined goal, specifically the protection of civilians within Libya.”

Earlier, the United States, Britain and France reacted cautiously to the declaration, saying they would judge Gaddafi by his actions. Clinton demanded that Libyan government forces move away from eastern Libya where they have been waging an offensive against rebel-held cities. And U.S. intelligence agencies expressed skepticism about the cease-fire.

Libyan Foreign Minister Musa Kusa told reporters Friday that as a United Nations member, Libya had no choice but to accept the U.N. Security Council resolution.

“Therefore, Libya has decided an immediate cease-fire and the stoppage of all military operations,” he said. He pledged that Libya would protect foreigners and foreign assets in the country.

Kusa also said his government would seek “the opening of dialogue with all channels interested in the territorial integrity of Libya,” suggesting that the regime might be prepared to talk to the rebels if they commit to the unity of the nation. The government has long harbored suspicions that the rebels have separatist intentions.

He said the cease-fire “will take the country back to safety” and ensure the security of all Libyans. But he also criticized the U.N. Security Council’s authorization of military action, which he said violates Libya’s sovereignty.

Musa did not elaborate on his brief statement, leaving unclear exactly what the cease-fire would mean and whether it would apply to other Libyan cities under attack from government forces or only to the front line with rebels in the east. Loyalist forces there are closing in on the rebel stronghold of Benghazi.

The CIA and other U.S. intelligence agencies have seen evidence of continued fighting despite the declared cease-fire, U.S. officials said. American spy agencies have monitored the violence using intelligence assets ranging from satellites to sources inside the country.

“There are [intelligence] reports out of certain areas that fighting continues,” said a U.S. official with access to classified intelligence on Libya. “There are indications that at least some elements tied to Gaddafi may not have gotten the message on the cease-fire.”

The official, who spoke on condition of anonymity because he was not authorized to discuss the matter, said the areas of continued fighting include Misurata.

Citing concern about Gaddafi’s intentions, the U.S. official said the cease-fire “should be considered tenuous at best right now.”

The Libyan announcement came after the Security Council on Thursday evening authorized member states “to take all necessary measures . . . to protect civilians and civilian populated areas under threat of attack in [Libya], including Benghazi, while excluding a foreign occupation force of any form on any part of Libyan territory.” This effectively paved the way for air and naval attacks against forces loyal to Gaddafi, who vowed a merciless assault on Benghazi.

The cease-fire declaration followed a British announcement that it was deploying warplanes to bases from which to start enforcing the U.N. resolution.

In Washington, Clinton told reporters, “Colonel Gaddafi’s refusal to hear the repeated calls up until now to halt violence against his own people has left us with no other choice than to pursue this course of action.”

Speaking after a meeting with her Irish counterpart, she said of the cease-fire announcement, “We are going to be not responsive and impressed by words. We would have to see action on the ground, and that is not yet at all clear.” She added, “We do believe that a final result of any negotiations would have to be the decision by Colonel Gaddafi to leave. But let’s take this one step at a time.”

The first and most urgent priority in Libya “is to end the violence,” Clinton said.

“We have to see a very clear set of decisions that are operationalized on the ground by Gaddafi’s forces to move physically a significant distance away from the east, where they have been pursuing their campaign against the opposition,” she said. “There will have to be an accounting of what has already occurred,” such as “massacres” and abductions, she said.

There was conflicting information Friday on whether Gaddafi’s forces were respecting the cease-fire. In a phone call to CNN, a resident of the rebel-held city of Misurata said shelling by government forces was continuing there after the cease-fire announcement. However, news agencies quoted rebels as saying they repelled a government attack in the morning and that the shelling had stopped. As many as 25 people were killed in the attack involving tank and artillery fire, al-Arabiya television reported. The city, Libya’s third-largest, is the last rebel-held urban area in the western part of Libya.

Gaddafi “will tell the world he has declared a cease-fire, and underground he is going to kill as many as he can and gain territorial advantage to improve his bargaining position,” the unidentified Misurata resident told CNN. “He has to be brought to justice and bombed into submission.”

Kusa’s announcement appeared to mark an abrupt reversal from a bellicose speech delivered the night before by Gaddafi, who threatened an imminent attack on Benghazi and warned residents there that Libyan forces would hunt them down “house by house, room by room.”

It was clear that the Libyan government was caught off guard by the speed with which the Security Council moved to authorize the use of force, after weeks of indecision during which pro-Gaddafi forces made significant advances against the rebels.

As recently as Thursday, officials were confidently predicting that China or Russia would veto the resolution, or that, if it did pass, at least 10 days would be needed to implement and enforce a no-fly zone, giving government forces enough time to retake Benghazi.

But with British and French officials warning that strikes could come within hours of the resolution, the government appeared to have concluded that it had no choice but to back down. Otherwise it would risk significant damage to its already limited military infrastructure from far superior Western forces.

Western powers, meanwhile, were going ahead with plans to enforce the resolution.

In London, British Prime Minister David Cameron said in reaction to the cease-fire declaration, “We will judge him [Gaddafi] by his actions, not his words.” The Security Council resolution made clear that “he must stop what he is doing, brutalizing his people,” he told the BBC. “If not, all necessary measures can follow to make him stop.”

Cameron earlier told Parliament that Britain was moving warplanes and aerial refueling and surveillance aircraft to bases from which “they can start to take the necessary action.”

A French Foreign Ministry spokesman said Paris also is being “very cautious” about the purported cease-fire. Gaddafi “ is now starting to be afraid, but on the ground the threat has not changed,” Bernard Valero told Reuters television.

In a 10 to 0 vote, with five abstentions, the Security Council called for an immediate cease-fire in Libya and approved the establishment of a no-fly zone over Libyan territory and the interdiction of ships carrying supplies to Gaddafi’s government. In broad language, the council approved the use of any means short of “foreign occupation” to end strikes against “civilian populated areas under threat of attack . . . including Benghazi.”

The vote marked a dramatic turn in the world’s response to the Libyan crisis after weeks of debate and reluctance by many to intervene, and it comes as rebel forces were said to be on the brink of defeat.

Celebrations erupted across Benghazi as word of the vote reached the rebels. Clerics chanted “God is great” over mosque loudspeakers, and the streets were filled with celebratory gunfire and people waving the pre-Gaddafi Libyan flag adopted by the rebels.

France said it was prepared to launch attacks within hours, and Britain also indicated that it was prepared to act quickly. Initial strikes are likely to target air defense systems and runways; it was unclear whether plans were also in motion to strike at tank columns and other government ground forces headed east.

U.S. officials said that it would probably take several days for a full operation to be undertaken and that President Obama had not yet approved the use of U.S. military assets. Obama has preferred to let other nations publicly lead the response to the Libyan crisis, and he did not appear on camera Thursday night to speak about the U.N. vote.

In a measured response to the vote that contrasted with threats earlier in the day by Gaddafi to “show no mercy” to the rebels, Libya’s deputy foreign minister, Khaled Kaim, told reporters in Tripoli that Libya welcomed clauses in the resolution calling for protection of civilians.

But he cautioned the international community against arming the opposition, saying it would be tantamount to “inviting Libyans to kill each other.” The intention of the Libyan armed forces, he said, was “to protect civilians and guarantee food and medical supplies.”

Adoption of the resolution was seen as the last major hurdle to implementing plans drawn up by NATO in recent weeks that include unspecified participation by U.S. warships stationed off the Libyan coast or U.S. aircraft.

Shortly after the vote, Obama called Cameron and French President Nicolas Sarkozy, the White House said in a statement. The leaders “agreed that Libya must immediately comply with terms of the resolution” and said they would “coordinate closely on next steps,” including working with “Arab and other international partners” to ensure enforcement of the resolution.

“There is no justification for [Gaddafi’s] continued leadership now,” Ambassador Susan E. Rice said after casting the U.S. vote in favor of the resolution. Russia, China, Germany, Brazil and India — all of whom expressed reservations about the move — abstained.

Earlier Thursday, Gaddafi had warned Benghazi that “we are coming tonight and there will be no mercy.” In an audio address delivered on state television, he promised to hunt down opposition “traitors” and vowed, “The whole world will watch Benghazi and see what will happen in it.”

Libya’s Defense Ministry threatened swift retaliation against any outside attack. “Any foreign military act against Libya will expose all air and maritime traffic in the Mediterranean to danger, and civilian and military facilities will become targets,” the Defense Ministry said in a statement distributed by the state news agency.

Thursday’s vote came only after the Arab League agreed Saturday to support a no-fly zone over Libya. The resolution “requests” Arab League members to cooperate with other U.N. members in implementing its terms, and U.S. officials said they expected that several Arab governments would help fund the operation or contribute military assets.

Lebanon’s U.N. ambassador, Nawaf Salam, provided no details on what role Arab countries would play in the military operation, saying that participants would make their own announcements. But he insisted that “there would be no forces on the ground in any form or in any part of Libya.”

In addition to a specific “ban on all flights in the airspace of the Libyan Arab Jamahiriya” and use of “all necessary measures” to protect civilians, the resolution authorizes interdiction and inspection “on the high seas” of all vessels and aircraft bound to or from Libya provided there are “reasonable grounds to believe that the cargo contains items” prohibited under a previously adopted arms embargo and other sanctions.

It also calls on all U.N. members to stop the flow of “armed mercenary personnel” to Libya.

Among the five governments that abstained in the vote, Brazil’s U.N. ambassador, Maria Luiza Riberio Viotti, voiced concern that military action in Libya would “exacerbate tensions on the ground and cause more harm than good to the same civilians we are committed to protect.”

She also warned that military action would undermine the “spontaneous homegrown nature’’ of popular uprisings spreading through the Arab world and threatened to “change that narrative in ways that would have serious repercussions” for Libya and the rest of the region.

Libya’s renegade U.N.-based diplomat, Ibrahim Dabbashi, praised the council’s action and urged outside powers to move “immediately” to halt Gaddafi’s military offensive. The vote, Dabbashi said, sent a clear message to the Libyan people that they “are not alone. We are glad that Benghazi will now be safe.’’

In a statement earlier Thursday, Secretary of State Clinton said that establishment of a no-fly zone would require “bombing targets like the Libyan defense systems.”

U.S. military officials said Libya has more than 30 surface-to-air missile installations, largely positioned along its Mediterranean coast, where most of the population resides. Its arsenal also includes an unknown number of long-range missiles that can reach as far as 180 miles off the coast. Libya also operates more than 15 early-warning radar sites along the coast, a Defense Department spokesman said.

At a Senate hearing Thursday, Undersecretary of State William J. Burns confronted sharply differing views about the Libyan crisis that crossed party lines. Some, led by Sen. John F. Kerry (D-Mass.), said the administration has been too cautious in its response. “Time is running out for the Libyan people,” Kerry said.

But Sen. Richard G. Lugar (R-Ind.), along with several Democrats, warned of the “risk that our involvement would escalate” and said the administration should “seek congressional debate on a declaration of war” against Libya before U.S. forces participate in any action.

Sly reported from Tripoli, Libya. Raghavan reported from Zuwaytinah, Libya. Staff writer Colum Lynch contributed from the United Nations. Staff writers Greg Miller, Karen DeYoung and Craig Whitlock in Washington contributed to this report.