ALGIERS (Reuters) - When Muammar Gaddafi ponders his future from his hideout somewhere in Libya, he will probably recall the fate of another fallen Arab autocrat, Saddam Hussein, pulled bedraggled from a hole in the ground.
With that precedent in mind, Gaddafi will be adamant, say people who know him, about two things: he will not give up the fight against Libya's new rulers and, if the end comes, he will not allow himself to be captured alive.
"Gaddafi will not stop fighting," said Fathi Ben Shatwan, who served under the former Libyan leader as minister for energy and industry until five years ago. "He will not stop unless he is stopped."
Libya's National Transitional Council (NTC), almost certainly with help from Western intelligence services, has mounted a manhunt to find Gaddafi that is focusing on the Sahara desert near the borders with Niger and Algeria.
The outcome of the hunt for Gaddafi also depends, at least in part, on the state of mind of the prey, and what he chooses to do with the dwindling options in front of him.
For the moment, all the signs suggest that, despite the odds stacked against him, he still believes he can take back power.
The last time the outside world heard from him, in a speech broadcast on Sept. 20 on a Syria-based television station, he said his system of rule was based on the will of the people and it was "impossible that this system be removed."
That confidence is unsurprising in a man who ruled Libya for 42 years and crushed several coup attempts and uprisings, though none ever on the scale of this rebellion.
"He will not give up and he will not lay down his weapons until the end," said Al-Baghdadi Ali al-Mahmoudi, who was Gaddafi's prime minister until a few weeks ago and is now in neighbouring Tunisia.
That view was echoed by Soad Salem, a Libyan writer. "Gaddafi will continue believing the illusion that he is still in power and can defeat the NTC forces. He will never acknowledge that he lost power," she said.
Salem has an explanation for this. "He is crazy," she said.
For all his eccentricity, Gaddafi is a pragmatist. He may believe he has identified a way back to power: a targeted insurgent campaign that would undermine the new government by hitting it at its weakest spot.
Libya depends on crude exports for its survival and this in turn needs foreign oil executives and engineers to operate the oil fields. A few carefully chosen kidnappings or bomb attacks would keep the foreigners away and dent oil production.
It is a strategy that does not require control of territory or major military resources, just money -- which Gaddafi is thought to have in large quantities -- a few weapons and some organisation.
"It is vital for the NTC: they need the foreign specialists," said Alan Fraser, Middle East analyst with AKE, a security and risk consultancy.
"One way for the Gaddafi loyalists to prevent that is to carry out a couple of attacks. It's about the propaganda coup that would give them in terms of preventing foreign companies from coming back in," he said.
"I am sure there will be Gaddafi elements that will evade capture and attempt to disrupt development, particularly in the oil sector."
An important question is whether Gaddafi, who was born in 1942, will have the nerve and physical stamina to stay on the run for a long time. If cornered, he may in the end choose to surrender quietly.
Asked about his state of mind, a former colonel in the External Security Organisation, Gaddafi's foreign intelligence service, said: "He will be afraid.
"In fact he's always been a bit afraid. He mistrusts his own people. You look at the tunnels he built under our country and our city (Tripoli). He did this to enable him to escape and hide," said the source, who did not want to be identified because of the sensitive nature of his past work.
However, Gaddafi is on familiar ground. His early years were spent leading a Bedouin existence, living in tents in the desert.
Even once in power he stuck to a spartan lifestyle, preferring to pitch a tent when visiting foreign capitals instead of staying in a hotel or the Libyan embassy.
"You should know that Gaddafi is used to living in tough conditions," said Ben Shatwan, the former energy minister.
"He is accustomed, since his childhood, to living in hot areas, cold areas, going hungry. He is used to that ... He is able to stay hiding unless he is discovered."
What though will Gaddafi do if his pursuers are closing in on him and there is no longer any prospect of carrying on the fight?
Fleeing to a neighbouring country is not an attractive option for him. One of his sons, Saadi, escaped across the border into Niger, where the authorities say they are keeping him under surveillance.
Possibly anticipating where he will end up next, Saadi has retained as his lawyer Nick Kaufman. He specialises in international tribunal cases and past clients have included a Cambodian Khmer Rouge prison commander and the Rwandan leader of a group accused of mass rapes and killings.
Oliver Miles, a former British ambassador to Libya, said Gaddafi will not opt for that fate, but will instead want to leave the stage on his own terms.
"It seems to me he would he would have very clearly in his mind what happened to Saddam Hussein, being caught in a hole, wearing a dirty shirt," said Miles.
After he was found hiding underground on a farm in northern Iraq in 2003, Saddam Hussein was put on trial and executed by hanging.
"I have a kind of personal hunch if you like, which is not more than that, and that is the best way to preserve his (Gaddafi's) legacy is just to disappear."
Miles said Gaddafi could do that by putting on a disguise, smuggling himself into a neighbouring country and then going to ground for the rest of his life. The risk of detection though, would be high.
"Another way would be to retreat into some army bunker and blow himself up," said Miles.
Additional reporting by Salah Sarra and William Maclean in Tripoli and Tarek Amara in Tunis; Editing by Giles Elgood