Libyan rebels met fierce resistance from Moammar Gaddafi’s last remaining stronghold in the capital Thursday and said they suspected they might even be closing in on the former leader or his sons.

But as rebels flocked to the neighborhood to join the assault, Gaddafi, ever defiant, appealed to his supporters in an audio message to march on Tripoli and “purify it” of the rebels, whom he called “rats, crusaders and unbelievers.”

His spokesman, Moussa Ibrahim, then called the Associated Press to say Gaddafi was safely in hiding in Libya and remains in command. Moussa said Gaddafi is capable of leading the resistance for “weeks, months and years.”

Meanwhile, the rebels’ civilian leaders appeared to be making progress in their campaign for the funds they desperately need to rebuild their country after six months of civil war.

In Tripoli, fighting was focused on the poor and traditionally loyalist neighborhood of Abu Salim, and in particular a cluster of apartment buildings not far from Gaddafi’s compound at Bab al-Aziziya, which the rebels stormed earlier this week.

“The people who are in Abu Salim are fighting strongly,” said 26-year-old commander Ibrahim al-Madani. “We believe that Gaddafi or one of his sons are in Abu Salim.”

Reporters on the scene said rebels were using antiaircraft guns to hammer at least 10 buildings sheltering Gaddafi loyalists. There were huge explosions, and the air was clogged with smoke. At least three of the buildings were burning.

“They are holding at least 10 tall buildings. They have heavy weaponry, maybe even a tank,” Mohammed Karami, a rebel involved in the battle, told the Associated Press. Mahmoud Bakoush, a rebel commander at the site, said there were unconfirmed reports that one of Gaddafi’s sons might be in the buildings.

At one point, six trucks of rebels from the coastal city of Misurata arrived to take out the snipers in the apartment complex, but journalists on the scene said they instead got preoccupied with removing a gigantic poster of Gaddafi in a general’s uniform hanging on the side of a building nearby.

“We are here to deal with the snipers,” said their commander, Nouri Sherkisi. But instead, his men started filling gasoline bombs to throw at the poster. Just as they were getting ready to burn it, gunfire crackled from all directions, and the rebels fled in their vehicles.

Outside Bab al-Aziziya, about a dozen bullet-riddled bodies lay face down in the grass, some with their hands tied behind their backs. It was not immediately clear who they were, but a number of Gaddafi sympathizers had camped out in a tent city on the grass for months. According to an earlier Reuters report, more than 30 men believed to be fighters loyal to Gaddafi were found shot to death Thursday at a military encampment in a central Tripoli traffic circle in an area that had been held by loyalists.

According to the AP, five or six bodies were in a tent erected on the traffic roundabout. One of dead still had an IV tube in his arm, and another body was completely charred, its legs missing. The body of a doctor, in his green hospital gown, was found dumped in a canal.

As the fighters tried to purge the capital of the last remnants of Gaddafi forces, there was still considerable chaos in the city.

A firefight erupted outside the Corinthia Hotel where many foreign reporters are staying. As bullets struck the hotel, rebels claimed it was a case of confused “friendly fire” between two groups of fighters communicating poorly.

Madani, the rebel commander, said rebel fighters now have full control of the airport but that Gaddafi loyalists were still shelling it with Grad rockets from outside. He said one civilian plane was destroyed this week.

Elsewhere in the country, rebels are trying to advance on the coastal city of Sirte, Gaddafi’s home town and tribal power center, which lies roughly halfway between Tripoli and Benghazi, the de facto rebel capital.

One group of rebels, backed by NATO warplanes, has advanced eastward along the coast from Misurata, while another group, attacking from Benghazi, said their advance has been stalled at the oil refinery at Ras Lanuf, around 130 miles east of Sirte.

Talks with tribal leaders in the city to negotiate a surrender have been continuing for at least two days without progress.

“We hope for a compromise,” said Col. Ahmed Bani, a spokesman for the rebel army. “We don’t want to fight them. We don’t want anybody else to die.”

In Tripoli, supplies of food, water and medicines are running low, civilians are largely staying indoors for fear of sniper attack, and the rebels are keen to prove to Tripoli’s residents they are capable of running the city.

“There are still many snipers in eastern Tripoli,” said one rebel fighter. “We’ll finish them off, but it’ll take time.”

Victims of the snipers filled Tripoli hospitals. “There are around 60 here,” said Tahr Kateb as he searched for the body of a nephew in a makeshift morgue at Tripoli’s al-Zawiyah hospital. “And they are still bringing in bodies, because of the snipers.”

At another hospital, Ali Modir said his mother was shot by a sniper when she left the safety of her house. “She wanted to go shopping,” Modir said, weeping.

Rebels also reported fighting around the city of Sabha, another Gaddafi stronghold south of Tripoli with a strong presence of loyalist troops — and another possible place of refuge for the Libyan leader himself.

The hunt for Gaddafi is one of the priorities for many Libyans, and NATO is providing intelligence and reconnaissance help, while continuing to bombard loyalist troops from the sky, British Defense Secretary Liam Fox said.

“There was increased NATO activity last night including British fast jets, because there are areas of resistance by the regime which has had considerable levels of military expertise, still has stockpiles of weapons and still has the ability for command and control,” Fox told Sky News.

“They may take some time to completely eliminate, and it is likely there will be some frustrating days ahead before the Libyan people are completely free of the Gaddafi legacy.”

Many people in Tripoli say they will not feel secure until the man who has ruled them through fear for 42 years is killed or captured. The possibility of guerrilla warfare from remnants of the regime still hangs over Libya’s future, and it is something Gaddafi has already considered, according to Abdel Salam Jalloud, a close ally who switched sides last week.

“He is sick with power,” said Jalloud, according to Reuters news agency. “He believes he can gather his supporters and carry out attacks. . . . He is delusional. He thinks he can return to power.”

In his audio message Thursday, Gaddafi himself continued to use fear as one of his main weapons, warning supporters that rebels would enter people’s homes and rape their women. “Don’t leave Tripoli for the rats. Fight them, fight them, and kill them,” he said. “It is the time for martyrdom or victory.” It was not clear when the audio message was recorded.

The country’s former central bank chief said Gaddafi had been trying to sell the country’s gold reserves to pay for his protection as he fled, possibly in the direction of the Algerian border.

“Now he is looking to pay and corrupt some tribes and some militia to have protection and to create further chaos,” Farhat Bengdara, who has allied himself with the rebels, told the Italian daily, Corriere della Sera.

Those reserves would also be immensely useful for the rebels, who remain desperate for money to rebuild their country and warned that failure to get hold of Libya’s frozen assets quickly would undermine stability.

They made progress on Thursday, with Italy agreeing to start unfreezing some $500 million in Libyan funds held in Italian banks, and South Africa appearing to drop its resistance to the unfreezing of about $1.5 billion in Libyan assets.

British Prime Minister David Cameron said he had called South African President Jacob Zuma on Thursday morning and that the two leaders “agreed that Libya now has the opportunity for transition to a peaceful, democratic and inclusive government.” Cameron said he and Zuma “discussed how the international community should actively and urgently support this process.”

Zuma agreed to the unfreezing of $500 million for humanitarian reasons and said it would consult its African Union partners about unfreezing the rest, Downing Street said.

The United States asked the U.N. Security Council on Wednesday to unfreeze the Libyan assets as soon as possible, and diplomats said a vote could come on Thursday or Friday.

A delegation from the Transitional National Council arrived in Tripoli on Thursday to begin setting up offices and assessing security for the rebel council’s move to the capital. The council plans to announce an interim Libyan government in Tripoli in two weeks, said Ahmed Jibril, spokesman for the council’s foreign ministry.

Council officials said elections for a general assembly to write a new constitution would be held within eight months and national elections within 20 months of the declaration of the interim government, which would be led by the council’s current leader, Mustafa Abdel Jalil.

A day after the freeing of foreign journalists held hostage at the Rixos hotel in Tripoli, there was more good news Thursday for the large and growing press corps covering the conflict in Libya.

Four Italian journalists kidnapped by regime sympathizers on Wednesday were freed after a raid on the house in Tripoli where they were being held, Corriere della Sera reported.

Freelance Maryland journalist Matthew VanDyke was also freed this week after months of solitary confinement in Tripoli’s infamous Abu Salim prison. He had disappeared shortly after arriving in eastern Libya in March, and his fate had been unknown until he was released Wednesday.

Correspondents Leila Fadel in Benghazi and Karla Adam in London contributed to this report.

Related stories on Libya

- The political rise and fall of Moammar Gaddafi

- Moammar Gaddafi through the years

- The battle for Libya

- Gaddafi bunkers and tunnels an elaborate setup

- Read more stories from around the world