Qaddafi appeared on the central Green Square to make an impassioned speech of defiance, after witnesses described swirling clashes on streets all around the city between security forces loyal to the 68-year-old leader and crowds of protesters.
Al Jazeera television said two people had been killed and several wounded in heavy shooting in several districts. Another channel, Al Arabiya, said seven people had been killed.
By around 5 pm (1500 GMT), some protests had been dispersed but others were continuing, a resident from central Tripoli told Reuters. Reporters had little freedom to move around. Foreign journalists escorted in to the city from the aiport by Qaddafi loyalists were confined to hotels.
Just before 7 pm, Qaddafi appeared to address tens of thousands of his supporters massed on the capital's central Green Square in a speech broadcast live on state television.
"We will fight if they want," he said, gesturing from a high stone wall. "We are ready to triumph over the enemy ... I am in the middle of the crowds ... We will defeat any foreign attempt, as we have defeated Italian colonialism and American raids."
Raising the prospect of wider civil conflict in Libya's tribal society, he also said he might arm tribesmen in future.
Tripoli and the surrounding area, where Qaddafi's forces had managed to stifle earlier protests, appeared to be his last main stronghold as the revolt that put the east under rebel control also reportedly advanced through the west. Even in the capital, resident saw opposition groups openly moving in some areas.
Zawiyah, an oil refining town on the main coastal highway 50 km (30 miles) west of Tripoli, fought off government forces on several successive nights, according to witnesses who fled across the Tunisian border at Ras Jdir.
"There are corpses everywhere ... It's a war in the true sense of the word," said Akila Jmaa, who crossed into Tunisia on Friday after travelling from the town.
Saeed Mustafa, who also drove through the town, said: "There are army and police checkpoints around Zawiyah but there is no presence inside."
Rebel control
Other reports say the third city, Misrata, 200 km (120 miles) east of Tripoli, was also under rebel control. Such reports are hard to verify, with foreign correspondents unable to travel freely around western Libya, and telephone and broadband connections poor.
But Qaddafi's son Saif al Islam said the government was in control of the west, south and centre, and that his family had no intention of leaving.
"We have plans A, B and C. Plan A is to live and die in Libya. Plan B is to live and die in Libya. Plan C is to live and die in Libya," he told Turkey's CNN Turk television.
People in Benghazi, under rebel control, said friends in Tripoli had told them protesters had demonstrated at mosques throughout Tripoli and had planned to converge on Green Square.
A resident who asked not to be identified told Reuters in an email that pro-Qaddafi forces had opened fire after hundreds of people in the Janzour district in western Tripoli started a protest march after Friday prayers.
Hadar, a businessman who declined to give his full name, told Reuters by telephone: "I saw two men fall down and someone told me they were shot in the head."
Ali, another businessman who declined to give his full name, told Reuters by phone that he was standing with a crowd near a mosque on a road leading to Green Square.
"They just started shooting people. People are being killed by snipers but I don't know how many are dead," he said.
UN High Commissioner for Human Rights Navi Pillay said "thousands" may have been killed or injured by Qaddafi's forces in the uprising, and called for international intervention to protect civilians.
The World Food Programme said first-hand accounts from people fleeing the violence indicated shortages of food, fuel and medical supplies, exacerbated by port closures.
Oil facilities
The rebels who have seized Libya's east said they controlled almost all oil facilities east of the Ras Lanuf terminal. A Reuters reporter saw that the other main terminal, Marsa el Brega, was in rebel control, with soldiers securing the port.
Prosecutor-general Abdul-Rahman al-Abbar became the latest senior official to resign, and told al Arabiya he was joining the opposition. Libya's delegations to the Arab League in Cairo and the United Nations in Geneva also switched sides.
In the first practical attempt to enrol the support of Libya's 6 million citizens since the uprising began, state television announced the government was raising wages and food subsidies and ordering special allowances for all families.
Qaddafi's four decades of totalitarian rule have stifled any organised opposition or rival political structures, but in the east, ad hoc committees of lawyers, doctors, tribal elders and soldiers appeared to be filling the vacuum left by Qaddafi's government with some succcess.
There was little sign of the radical Islamists whom Qaddafi has accused of fomenting the unrest.
Instead, in Benghazi, the "Feb 17. coalition" was cleaning up, providing food, building defences, reassuring foreign oil firms and saying it believed in a united Libya.
Army and police in the eastern city of Adjabiya told Al Jazeera that they, too, had gone over to the opposition.
The turmoil, inspired by successful revolutions in neighbouring Tunisia and Egypt, has caused particular global concern because Libya supplies 2 percent of the world's oil, the bulk of it from wells and supply terminals in the east.
Abdessalam Najib, a petroleum engineer at the Libyan company Agico and a member of the Feb. 17 coalition, said the rebels controlled nearly all oilfields east of Ras Lanuf.
But industry sources told Reuters that crude oil shipments from Libya, the world's 12th-largest exporter, had all but stopped because of reduced production, a lack of staff at ports and security concerns. A company source at Ras Lanuf said operations there had shut down.
Benchmark Brent oil futures were steady at around $111, after a Saudi assurance that it would replace any shortfall in Libyan output brought prices back from Thursday's peak of nearly $120.
International steps
French President Nicolas Sarkozy, in Turkey, said Qaddafi "must leave", but cautioned against military intervention.
The UN Security Council was to meet on Friday to discuss a French-British proposal for sanctions against Libyan leaders, although a vote is not likely until next week.
French Foreign Minister Michele Alliot-Marie said the draft would ask for an arms embargo, financial sanctions and a request to the International Criminal Court to indict Libyan leaders.
A German diplomatic source said the European Union was likely to agree its own sanctions early next week.
Switzerland said it was freezing any assets owned by the Qaddafi family.
But Nato Secretary General Anders Fogh Rasmussen said Nato members had not yet discussed trying to impose a no-fly zone to protect rebel-held areas from air attacks.
Foreign governments mostly focused on evacuating thousands of their citizens trapped by the unrest.
Chinese official media said Beijing had so far evacuated 12,000, or about one third, of its citizens from Libya. A US-chartered ferry that had been trapped in Tripoli for two days by bad weather finally set off for Malta.
Britain said it was sending a naval destroyer and drawing up plans to pull out British oil workers stranded in desert camps.
COMMENTS (1)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ