By Maria Golovnina and Michael Georgy
TRIPOLI (Reuters) - Libya said on Friday it would halt all military operations to protect its civilians and comply with a U.N. resolution, backtracking from a threat to root out rebels after Western powers warned of punitive action.
The United Nations authorised a no-fly zone and attacks on forces loyal to Muammar Gaddafi, who had hours earlier vowed to crush Libya's revolt with "no mercy, no pity."
Foreign Minister Moussa Koussa said Libya was ready to open dialogue with all parties, without specifying who. He also said the no-fly zone would increase the suffering of Libyans and said authorising military action was "unacceptable."
Rebels, based in Benghazi, have said the only talks they will have is about how Gaddafi ends his 41 years in power. Ordinary Libyans in the east said they were sceptical about Koussa's remarks but said it suggested Gaddafi could be falling.
In rapid about turn from the Libyan leader's threat on Thursday night, Koussa told reporters in Tripoli: "We decided on an immediate ceasefire and on an immediate stop to all military operations."
France, which has been at the forefront of calls for a no-fly zone and military action, said it remained cautious after Koussa's comments, saying the threat on the ground in Libya had not been lifted.
OFFER OF DIALOGUE
"(Libya) takes great interest in protecting civilians," Koussa said, after Gaddafi's forces used warplanes, tanks and gunboats to retake territory rebels had controlled in the east and pummelled towns that rebelled in the west with heavy arms.
Koussa also said Libya was committed "to offer humanitarian aid to (Libyans) and to respecting all human rights and abiding by international and humanitarian laws."
Libya was "obliged to protect all foreigners and all of their assets," he said, adding Libya was acting in line with the U.N. Security Council resolution.
Koussa also held out the offer of talks.
Libya would "comply with the resolution in protecting civilians and the territorial unity of Libya, and therefore the country will open all channels of dialogue with all sides interested in the territorial unity of Libya," he said.
Gaddafi had offered talks with rebels earlier in the conflict, but the rebels rejected talks that could leave him in power.
"We express our deep regret regarding the resolution that included severe measures against the Libyans, including the no-fly zone which includes civilian flights, which will increase the suffering of the Libyan people," Koussa said, adding that civilian flights should have been exempted.
"Libya also finds that it is very strange and unacceptable that the Security Council allows in its resolution for the use of military force and there are signs that this might indeed take place," he said, adding that this violated the U.N. charter and Libya's sovereignty.
The U.N. Security Council passed a resolution endorsing a no-fly zone and authorised "all necessary measures" -- code for military action -- to protect civilians against Gaddafi's forces.
(Additional reporting by Sherine El Madany and Marwa Awad in Cairo; Writing by Edmund Blair; Editing by Peter Graff)