He was meant to be hidden, hunted, done for, and with just a few hours left, shut away to rot in the underground bunker of Bab al-Azizia, a prisoner of his past and highly uncertain present. At one point on Friday, he was meant to be dead. But just before sunset on another dramatic day for Libya, Colonel Muammar Gaddafi reappeared, like an icon, high up on the wall of the great Arab fortress that looks on to Tripoli's Green Square. "Here I am among you," he shouted into the microphone. "Dance, sing, rejoice."

He was greeted by a roar from a crowd of several thousand people in the square. They had gathered there in the morning to shout to the world that Libya, or at least its capital, was still his.

Green flags fluttered beneath the palm trees. Horns were sounded. Bursts of machine gun fire were let off into the air – an indication that, all the same, this is a country at risk. The opposing factions are drawing ever closer to one another. The abyss of a civil war seems but a step away.

"Those who don't love me … It will be hell for them," Gaddafi warned, firing the hearts of his followers, but also sending a clear message to the entire international community.

Looking down on his adoring audience, he said: "Look, Europe. Look, United States. This is the Libyan people. This is the fruit of the revolution."

And in what sounded very much like a declaration of war, he continued: "We shall open the arsenals. We shall arm the people. We shall fight for the soil of Libya. We shall struggle and reconquer every bit of territory. The revolution has resuscitated Omar el-Mokhtar [Libya's national hero] and we shall win, just as we won against Italian colonialism. Prepare yourselves to defend Libya."

Gaddafi, then, is back on the scene and playing what seems to be his last card. For the fundamentalism that he has so often evoked as a dangerous virus that could take over and devour Libya is unquestionably showing signs of growth.

You only needed to be iin front of the mosque dedicated to Nasser, shortly after the end of the Friday prayers in which the imam called for peace for this troubled land. A hundred or so young fundamentalists began raising militant chants of "Allah is great" as Gaddafi's devotees were assembling a few hundred metres away in Green Square.

"They're al-Qaida," said a young man in a worried voice as he sped from the area. And, indeed, within two or three minutes the chanters had formed a procession that was heading for Green Square with the clear intention of a first, impromptu settling of accounts.

The police stepped in, firing their Kalashnikovs into the air. But then bullets – it was not clear from which side – flew chest-high. There were people left on the asphalt. One witness spoke of at least one dead and 10 injured, but it was impossible to make a reliable count.

Bursts of machine-gun fire and pistol shots are heard ever more frequently. Firefights between police and rebels have been reported in the last few hours in the Janzour, Fashloum and Souk al-Sonaa districts. Shots have been heard in the market.

Fabrizio Caccia is special correspondent of the daily Corriere della Sera, one of nine Italian journalists invited to Tripoli by the Libyan embassy in Rome.