By Maria Golovnina and Michael Georgy
TRIPOLI (Reuters) - President Barack Obama said on Friday Muammar Gaddafi's government must end violence and pull back troops from towns under attack, or face military action.
Gaddafi's government earlier declared a unilateral ceasefire as Western warplanes prepared to attack his forces, which had defeated rebels in the western city of Zawiyah and driven them back in a counter-offensive toward Benghazi in the east.
In the rebel-held western city of Misrata, surrounded by government forces, residents said there was no sign of a ceasefire. And in the rebel-controlled east, the government declaration was dismissed as a ruse.
"All attacks against civilians must stop," Obama said. "Gaddafi must stop his troops from advancing on Benghazi, pull them back from Ajdabiya, Misrata and Zawiyah, and establish water, electricity and gas supplies to all areas. Humanitarian assistance must be allowed to reach the people of Libya."
"Let me be clear, these terms are not negotiable... If Gaddafi does not comply ... the resolution will be enforced through military action."
French Foreign Minister Alain Juppe said everything was ready to launch military strikes in Libya and that the ceasefire would need to cover the whole country.
Britain, like France a strong advocate of armed action, said it would judge Gaddafi by "actions, not his words."
After embarking on wars in Afghanistan and Iraq, the United States had insisted it would participate in rather than lead any military action. Obama said the United States would not deploy ground troops in Libya.
Turkey, an opponent of military action, said the Libyan ceasefire should go into effect immediately.
"We decided on an immediate ceasefire and on an immediate stop to all military operations," Libyan Foreign Minister Moussa Koussa said in Tripoli earlier, after the U.N. Security Council passed a resolution authorising military action.
He called for dialogue with all sides. On Thursday, Gaddafi had vowed to show "no mercy, no pity."
AIRCRAFT PREPARING FOR DEPLOYMENT
Officials said one or more Arab countries would play a role in the Libya operation. Gulf state Qatar said it would take part but it was unclear whether that meant military help. Libya's neighbor Tunisia said it would not play any role.
"Britain will deploy Tornadoes and Typhoons as well as air-to-air refuelling and surveillance aircraft," Prime Minister David Cameron told parliament.
"Preparations to deploy these aircraft have already started and in the coming hours they will move to airbases from where they can start to take the necessary action."
Italy said it would make seven military bases available along with equipment and troops, and Naples could be the coordination center.
Denmark and Canada said they planned to contribute warplanes. France was to host talks on Saturday to discuss the action with British, Arab League and other leaders including U.S. Secretary of State Hillary Clinton.
NATO Secretary-General Anders Fogh Rasmussen said after a meeting of alliance ambassadors that NATO was "completing its planning in order to be ready to take appropriate action ... as part of the broad international effort."
Despite the ceasefire announcement, people in Misrata said the city was under heavy bombardment by Gaddafi's forces.
"They are bombing everything, houses, mosques and even ambulances," Gemal, a rebel spokesman, told Reuters by phone from the last big rebel stronghold in the west.
Another rebel named Saadoun said: "We believe they want to enter the city at any cost before the international community starts implementing the U.N. resolution.
"We call on the international community to do something before it's too late. They must act now."
A British-based doctor who said he had spoken to his contacts in Misrata after 1600 GMT described the situation there as "very, very dire."
"There is no ceasefire," he said.
"Yesterday there was celebration after the U.N. vote, even by ordinary people, they don't want the regime any more. But those guys are basically fighting with sticks against anti-aircraft guns. .... There is no choice but to fight for them."
Al Arabiya also said the rebel-held western town of Zintan was attacked by rockets on Friday. The fighting reports could not be independently confirmed. Authorities were preventing Tripoli-based foreign journalists om reporting freely.
In rebel-controlled Tobruk in the east, there was scorn for the ceasefire call. On Thursday, Gaddafi had vowed "no mercy and no pity."
"See how things change from night to day," said Ashraf Afgair. "They are just trying to calm international opinion. It's a desperate attempt by Gaddafi to cling to power."
But Gaddafi's troops did not fulfil his threat to overrun the rebel base of Benghazi overnight after their rapid counter-offensive brought them to within 100 km (60 miles) of the eastern city.
U.S. HEAVY LIFTING
The U.N. Security Council passed a resolution endorsing a no-fly zone and "all necessary measures" to protect civilians from Gaddafi's forces.
Libya's military airfields are mostly strung along the Mediterranean coast, as are its population centres. Gaddafi's ground troops are advancing from the west along the main coast road toward Benghazi in the east.
While other countries or NATO may play roles in military action, U.S. officials expect the United States with its extensive air and sea forces to do the heavy lifting in a campaign likely to include air strikes on tanks and artillery.
Ten of the Council's 15 member states voted in favor of the resolution, while Russia, China and Germany were among five that abstained. The resolution was co-sponsored by France, Britain, Lebanon and the United States.
Apart from military action, it expands sanctions against Gaddafi and associates. Among firms whose assets it orders frozen are the Libyan National Oil Corp and the central bank.
Gaddafi's Defense Ministry warned of swift retaliation, even beyond Libyan frontiers, against hostile action.
"Any foreign military act against Libya will expose all air and maritime traffic in the Mediterranean Sea to danger and civilian and military (facilities) will become targets of Libya's counter-attack," the ministry said in a statement.
Foreign military action could include no-fly and no-drive zones, a maritime exclusion zone, jamming army communications and intelligence help. Air strikes would almost certainly be launched to knock out Libyan radar and air defences.
(Additional reporting by a Reuters reporter in Benghazi, Mariam Karouny and Tarek Amara in Tunisia, Louis Charbonneau and Patrick Worsnip at the United Nations and John Irish in Paris; writing by Myra MacDonald; Editing by Kevin Liffey)