By Giles Elgood
LONDON (Reuters) - As his armed forces roll over rebel fighters, Libya's Muammar Gaddafi has shaken off his delusional first response to the uprising and is reasserting his grip on the country he has ruled for more than 40 years.
After presidents in Tunisia and Egypt succumbed to popular revolutions, swift early gains by rebels in Libya made it look as though Gaddafi would be the next Arab domino to topple.
His initial reaction to the rebellion was defiant, but denied what was happening in plain sight on Libyan streets. There were no demonstrations, he told Western journalists. Nobody was against him and all his people loved him.
With his penchant for bedouin tents and heavily armed female bodyguards, Gaddafi has cut a bizarre and eccentric figure over the years, and his accusations that the rebel fighters were al Qaeda stooges high on drugs did nothing to dispel that view.
But another feature of his long period in power has been his readiness to use deadly force against his own people. That is what is happening now, as Gaddafi presses his counter-offensive and rebel hopes of Western military aid are fading.
As his forces advanced toward the rebel stronghold of Benghazi, a confident Gaddafi taunted Western countries that have backed a no-fly zone over Libya but shown no sign of actually imposing one.
"Strike Libya?" he said. "We'll be the one who strikes you! We struck you in Algeria, in Vietnam. You want to strike us? Come and give it a try."
And if Western nations do strike, "we will ally ourselves with al Qaeda and declare holy war," he told an Italian newspaper.
Long derided in the West as crazy, Gaddafi said French President Nicolas Sarkozy, one of a small number of Western voices to back a no-fly zone over Libya, was "suffering from mental illness."
Gaddafi's increasingly defiant response to the uprising comes as Western nations have shrunk from taking concrete action to help the rebels. But his handling of the crisis seems also to be conditioned by his background.
"Gaddafi is firstly a military man," said Tara O'Connor, managing director of Africa Risk Consulting.
"He postured until his perceived enemy showed its hand. The West's prevarication and Gaddafi's preparedness to use overwhelming force will see him secure his hold on power.
"What will follow is a wave of brutal repression to 'cleanse' Libya of resistance groups and to discourage any further popular support," she told Reuters.
Gaddafi had forgotten that his role as leader was to serve and protect his people and had turned them into his enemy.
"In this, he keeps faith with Africa's few remaining dinosaurs -- Robert Mugabe, Omar Bashir and Teodore Obiang Nguema," O'Connor said, referring to the leaders of Zimbabwe, Sudan and Equatorial Guinea.
Nigel Inkster, an analyst with the London-based International Institute for Strategic Studies, said Gaddafi now appeared to be growing in confidence.
"Yes, Gaddafi has his own frame of reference but actually to date that frame of reference has worked pretty well for him and after a rather uncertain start it seems in the short term to be working for him again," he told Reuters.
Opposition figures in Benghazi were under no illusion about what might happen once a reinvigorated Gaddafi prevailed in the absence of Western assistance for the rebels.
"He will kill civilians, he will kill dreams, he will destroy us more and more, and it will be on everybody's conscience that they haven't interfered," said Dr Jalal Al Gallal, of the opposition National Libyan Transitional Council, in an interview with the BBC on Wednesday.
Gaddafi's ability to push back the rebels on the battlefield has been based on superior military force, which is now being brought to bear after initial advances by the opposition.
Difficult fighting in the town of Zawiyah has shown that the rebels are hard to beat if it comes to street fighting. But Gaddafi apparently has the resources to sustain his military machine even if the country's oil revenues have now dried up.
He has tens of billions of dollars in cash hidden in Tripoli that will allow him to keep fighting despite an international freeze on Libyan assets, The New York Times reported, with some of the funds recently moved from Libyan banks to the leader's own compound in the capital.
With his record of supporting international terrorism and taunting the United States, Gaddafi was called "the mad dog of the Middle East" by President Ronald Reagan.
But that is not the full story on the Libyan leader, according to psychiatry professor and former CIA staffer Jerrold M. Post. Writing in Foreign Policy magazine, he suggested Gaddafi was "crazy like a fox" -- mad on the surface, but actually shrewd and cunning.
(Additional reporting by Adrican Croft; Editing by Janet Lawrence)