TRIPOLI Libya's rebel leaders must plan in detail how they would run the country if Muammar Gaddafi stood down and should learn from Iraq after the 2003 invasion, British Foreign Secretary William Hague said on Sunday.
Western governments and the Libyan rebels say a combination of NATO air strikes, diplomatic isolation and grass-roots opposition will eventually end the Libyan leader's 41-year rule.
But they are worried that his departure could leave a vacuum that leads to violence and instability, as happened in Iraq after the U.S.-led invasion of 2003 toppled Saddam Hussein.
The rebel National Transitional Council, based in the eastern stronghold of Benghazi, has a plan for how it would act if Gaddafi left but it is only embryonic, Hague told the BBC.
"We're encouraging the National Transitional Council to put more flesh on their proposed transition -- to lay out in more detail this coming week what would happen on the day that Gaddafi went -- who would be running what, how would a new government be formed in Tripoli?"
U.S. Defence Secretary Robert Gates said "it's only a matter of time" before Gaddafi stood down. "Day by day Gaddafi is seeing the people that are closest to him walking away," Gates told troops in Kandahar, Afghanistan, in answer to questions.
"Clearly the continuing pounding he's taking, the international isolation, is all having an effect. The entire international community is basically saying he's got to go," Gates said.
Britain and France were the driving force behind NATO's military intervention in Libya. Hague visited Benghazi on Saturday and was greeted by crowds shouting "Libya free!" and "Gaddafi go away!"
He said the rebels planned to bring technocrats from Gaddafi's ruling circle into the new leadership, a lesson learned from Iraq where the decision to bar members of Saddam Hussein's Baath party from government posts fuelled instability.
"No de-Baathification, so certainly (the rebels are) learning from that," said Hague. "They now need to publicise that more effectively, to be able to convince members of the current regime that that is something that would work."
Gaddafi says he has no intention of stepping down. He says he is supported by all Libyans -- apart from a minority whom he has described as "rats" and al Qaeda militants -- and says NATO has intervened to steal Libya's oil.
The government condemned Hague's visit to the rebel headquarters as a violation of Libya's sovereignty.
"The sole legitimate representative of the Libyan people is the Libyan state, not a group of people representing themselves only," the foreign ministry said in a statement.
Four months after thousands of Libyans rose up against his rule, and his security forces responded with a fierce crackdown, Gaddafi remains in control of most of western Libya.
The rebels control the east, the western city of Misrata and a mountain range near the Tunisian border. But Gaddafi's better-equipped forces blocked their advance on the capital.
The British defence ministry said its Apache helicopters were in action for a second day, using missiles to destroy a multiple rocket launch system on the coast near the eastern town of Brega.
The ministry also said its Tornado aircraft, with other NATO warplanes, had attacked a surface-to-air missile depot in Tripoli on Saturday.
In Tripoli, a military facility was destroyed by NATO bombing. A Reuters reporters saw rows of aluminium-covered hangars that had been blasted to pieces.
Government officials would not let reporters film and gave no details about the facility. In a Coptic Christian church next door to the site, some windows had been shattered by the force of the blasts.
Libyan officials also took reporters to a farm on the outskirts of the city where there was a large crater in the ground. The spot was about 1 km (mile) from an army base.
"I say to Obama: why do you bomb my father's farm?" said Mohammed Elyrusi, who said he was bringing his children to visit their grandfather when the bombs struck.
No one was hurt, but a house and outbuilding were wrecked and livestock were killed. "What is this? What is this?" Elyrusi asked, picking up the carcass of a dead chicken.
A rebel spokesman in the town of Nalut, part of the Western Mountains range near Tunisia, asked why NATO was not doing more to protect civilians in the region.
"Gaddafi's forces have been shelling Nalut for about 24 hours. Twelve people were wounded yesterday," said the spokesman, called Kalifa. "We do not know why NATO has not hit the (pro-Gaddafi) brigades positioned in our area," he said.
Rebel fighters have pushed Gaddafi's forces out of Misrata after weeks of fighting that killed hundreds of people.
Youssef, a rebel spokesman, said three rebels were killed in continued fighting in the suburb of Dafniyah on Saturday, but that Misrata was quiet on Sunday.
(Additional reporting by Hamid Ould Ahmed in Algiers, David Alexander in Kandahar, Afghanistan, and Christina Fincher in London; Writing by Christian Lowe; editing by Jon Boyle)
Our top photos from the past week.