Yelling in a raspy voice and flanked by several bemused-looking bodyguards, Gadhafi said, "We can defeat any foreign attempts, we can defeat any aggression, and we will arm all the people."
His appearance came after reports that soldiers loyal to him opened fire on protesters in Libya, killing five people.
"Col. Gadhafi has lost the confidence of his own people," Carney told reporters.
French President Nicolas Sarkozy called on Gadhafi to step down, and U.N. and NATO officials held emergency meetings to figure out what the world can do to prevent Libya from spiraling into a bloody madness.
But in Tripoli, Gadhafi seemed oblivious to the turmoil. He wore a winter jacket and elaborate hood as he addressed the crowd. "Dance, sing, stay up all night. Live a life of dignity with high morals. Dance and sing. Gadhafi is one of you," he exhorted.
The crowd included a number of men wearing green headbands and hoisting green banners who seemed to be Gadhafi supporters. Gadhafi blew elaborate kisses to the crowd before disappearing with his entourage.
Gadhafi's latest bizarre appearance was broadcast around 6:50 p.m. local time on Libyan state television. It was impossible to verify if it was truly live, as state television said, or in fact prerecorded.
Nevertheless, the scene was so astonishing that even the anchormen on the Al-Jazeera network were sputtering and stammering as they struggled to make sense of the dictator's rant.
"We will die here on the dear soil of Libya," Gadhafi said. "We will defeat any foreign attempt on our country as we defeated the Italians."
The speech came as Libya moved one step closer to total chaos today.
Harrowing cell phone photos of protesters lying in pools of blood in Tripoli aired on television earlier today. At least two were reportedly shot dead by pro-Gadhafi supporters not long after prayers.
Opposition forces who have seized much of the east began closing in on Tripoli despite Gadhafi's refusal to budge. In the rebellious cities in the east, tens of thousands held rallies in support of the first Tripoli protests in days. CNN also reported that protesters took control of the eastern Libyan city of Brega and its oil terminal.
The U.S. Embassy in Tripoli was closed today after a chartered flight carrying Americans left the city.
"It is shuttered," Carney said in response to a reporter's question about the embassy.
A ferry that had been chartered to evacuate American citizens from Tripoli finally arrived in Malta at around 9 p.m. local time. The vessel had been stuck in Tripoli for more than two days because of rough seas with 16-foot waves.
Police and ambulances met the ship and stretchers were seen being brought to help some of the passengers, who had reportedly fallen ill during their 48 hours on the ferry and its stormy, eight-hour passage across the Mediterranean.
The ferry was carrying about 300 people, at least half of whom were Americans, Elijah Waterman, a spokesman for the U.S. Embassy in Malta, told AOL News.
Hospitals in Malta were on standby and had been told to expect a good number of sick passengers. A number of boats with evacuees of different nationalities were expected in Malta. Al-Jazeera said there were reports that "many Americans" were said have fallen ill on the ferry because of the rough seas.
The unrest rocking Libya is the latest in a wave of pro-democracy fervor that's swept North Africa in recent weeks. The protests have already toppled Egyptian President Hosni Mubarak and Tunisia's Zine El Abidine Ben Ali.
Rallies were also taking place today in Yemen, Bahrain, Egypt and Iraq, where five protesters have been killed by security forces. Baghdad is under lockdown.