Libya's new rulers said they were holding back an assault on one of the last bastions loyal to Muammar Gaddafi but were edging towards the ousted ruler's birthplace of Sirte.
Southern neighbour Niger said on Sunday one of the fugitive former leader's sons, Saadi Gaddafi, had turned up there after crossing the remote Sahara desert frontier.
The National Transitional Council (NTC), which is trying to exert its control over the entire country three weeks after its fighters stormed Tripoli, said it planned to unveil a new, more inclusive government in seven to 10 days.
It also said it had begun producing oil, Libya's economic lifeblood, production of which had been all but halted throughout six months of civil war. In Tripoli, NTC fighters revealed they had captured Gaddafi's foreign spy chief.
The NTC says it will not declare Libya liberated until it has taken control of towns still in the hands of Gaddafi loyalists. It had given holdout towns a deadline of Saturday to surrender and its fighters have been battling since Friday inside Bani Walid, 150 km (95 miles) southeast of the capital.
They said on Sunday they were meeting stiff resistance in Bani Walid, but were edging towards Sirte, which sits on the main east-west coastal highway, effectively cutting Libya in two.
Advancing NTC troops said the front line was about 90 km east of Sirte. Fighters were firing tanks and howitzers amid the sound of heavy machinegun fire and the roar of NATO warplanes overhead.
There were clashes this morning and Gaddafi forces were firing Grad rockets, but we managed to advance a little bit and we will enter Sirte very soon, fighter Salah al-Shaery said.
The interim government has sent additional brigades to Bani Walid, but some fighters on the ground said the move had only exacerbated existing tribal sensitivities.
Locals don't listen to NTC commanders, said one fighter, Esam Herebish. They do what they like. They want to be seen as the city's liberators.
Fighters trying to take the town also said they suspected local fighters of the Warfalla tribe, Libya's largest, of passing information to pro-Gaddafi forces inside Bani Walid.
We believe there are traitors among them, said Muhamed el Gahdi, a fighter from the coastal city of Khoms.
NTC spokesman Ahmed Bani told reporters the plan for Bani Walid for now was to wait.
When our forces entered Bani Walid they found the brigades of Gaddafi using citizens as shields, he told reporters. He said Gaddafi fighters had put missile launchers on the roofs of houses with civilian families inside, making it impossible for NTC forces or their allied NATO war planes to strike.
The justice minister of Niger said Gaddafi's son Saadi had been intercepted in a convoy after crossing the frontier, heading in the direction of the oasis town of Agadez. Two of Gaddafi's other sons, Mohamed and Hannibal, and his only daughter Aisha have already obtained shelter in Algeria.
Three sons remain at large -- Mutassim and Khamis, who both run elite military units, and Saif al-Islam, Gaddafi's one-time heir apparent who, like his father, is wanted for war crimes by the international court in the Hague. One son, Saif al-Arab, was reported killed during the war.
Asked what Saadi Gaddafi's status in the country was, Justice Minister Marou Adamou said only that Niger would fulfil its humanitarian obligations. Washington and others have put pressure on neighbouring states not to shelter Gaddafi or officials wanted for crimes.
The NTC, based for months in the eastern city of Benghazi, faces the difficult task of winning the support of all Libyans, including fighters from towns and cities in the west who did the bulk of the fighting in the rapid advance on Tripoli.
The interim government also has to deliver on promises to quickly restart an economy frozen by international sanctions, the halt in oil production and an exodus of foreign workers.
Inside Tripoli, Reuters reporters saw Bouzaid Dorda, a former prime minister who ran Gaddafi's external spy service, held by a group of about 20 fighters in a house in Zenata district. A fighter said he would be handed over to the interim authorities later on Sunday.
A lanky figure in safari jacket and slip-on shoes, Dorda was sitting on a sofa and was not physically restrained, but an armed guard sat beside him. He declined a request for an interview, but in response to an assertion by a fighter that he had killed people, he replied: Prove it.
I am innocent until proven guilty. I am willing to be referred to the Libyan prosecutor general, he said. Visibly agitated, he added: You have to remember it was a regime already in existence.
U.N. WORRIED FOR CIVILIANS
The United Nations says it is worried about the fate of civilians trapped inside the besieged pro-Gaddafi bastions.
Our big concern right now is Sirte, where we are receiving reports that there's no water and no electricity, U.N. humanitarian chief Valerie Amos told Reuters in an interview.
She said the world body was also worried about the fate of sub-Saharan African migrants, who face revenge attacks as suspected mercenaries even though most are ordinary labourers.