Libyan rebels were facing a new battle on Saturday, struggling to provide Tripoli's residents with water, electricity, petrol and food, amid power outages and with much of the capital's water cut.
Mountains of rubbish have piled up on the sweltering city's streets since rebels entered the capital over a week ago, battling Moamer Kadhafi's forces until they stormed his compound on Tuesday and then mopping up after that.
Electricity is out for several hours a day, many districts have no water, and others only have undrinkable ground water. The price of food and petrol has skyrocketed, when it can even be found.
A litre of petrol that used to cost 0.15 dinars (12 US cents/eight euro cents) now costs around three dinars ($2.47/1.70 euros). Petrol can only be bought on the black market from those who stocked up before the conflict reached Tripoli.
The price of milk has gone from one dinar a litre to 2.50 dinars.
"When the revolution started in February, Kadhafi doubled many salaries to try to show that he is good. If you made 300 dinars, you got 600," Tripoli resident Abdel Rahman Hamza told AFP. "But it's not enough."
Rebels have captured the Ras Jdir border post on the frontier with Tunisia, which it was feared Kadhafi might use to escape, but it is also a potentially vital gateway to resupplying the capital.
However, they still need to capture Zuwarah, 90 kilometres (56 miles) west of the capital, to fully free-up the coastal highway to Tripoli.
The situation is all the more acute because Muslims will end the fasting month of Ramadan with the feast of Eid al-Fitr on Monday or Tuesday, traditionally a time of heavy consumption and the giving of gifts such as clothes.
Some shops outside the centre have reopened, but it is not clear how they can be resupplied.
Signup to our newsletter and follow us on Facebook and Twitter!
Mohammed Ben Ras Ali, a member of the stabilisation team that has been working under Infrastructure Minister Ali Jihani with the European Union and United States for post-Kadhafi scenarios, nevertheless remained upbeat.
"Everything turned out better than we expected," he told AFP. "Water is a major concern, it is our number-one priority. We have 32 ships waiting to enter with water, medical supplies and fuel."
United Nations Secretary General Ban Ki-moon has also highlighted Tripoli's predicament.
"Reports on the ground suggest that the water supply to the capital and surrounding region may be in danger -- putting several million people, or more, at risk," he said on Friday.
However, rebels denied that Kadhafi had cut off Tripoli's water supply, which arrives from the southern deserts, despite shortages including at the main hospital.
"The water has not been cut off," National Transitional Council spokesman Mahmud Shammam told AFP. "We have enough supplies of drinking water; we have some technical problems but we are addressing the situation."
Many residents have complained that their water has been cut off since the capital fell to rebels, while rumours are rife that Kadhafi has poisoned the water in the city of around two million.
The morgue at Tripoli's main hospital also has no water, an AFP correspondent said, with workers there struggling to clean up the blood from those killed in days of fighting in the capital.
A worker at the morgue told AFP Kadhafi had cut off the water supply from desert ground water at Jebel Hasuna, around 700 kilometres (450 miles) to the south of Tripoli, through the so-called Great Manmade River Project.
An engineer at the Corinthia Hotel, where many foreign journalists are staying since the capital fell, said that "Tripoli has no water."
"We have a reservoir; it's very big but we don't know how long it will last. Hopefully until they decide to open the supply again," he said, asking not to be named.