ALGIERS (Reuters) - If Muammar Gaddafi, as now seems plausible, defeats an insurgency in the east and regains control of Libya, he is likely to resume a familiar role: that of international pariah, reliant on force to suppress unrest.
For two decades starting in the 1980s, Libya was subject to international sanctions and during the same period, Gaddafi fought off an insurgency in the east of the country.
Now, once again, foreign governments and the United Nations are imposing sanctions and Gaddafi is facing an insurgency by rebels in the east.
So what has changed?
Much is the same. Now, as before, Gaddafi is likely to shrug off sanctions or even turn them into a badge of honour. But if there is a difference, it is that this time around the scale of the internal unrest is likely to be much greater.
"The idea that all he's got to do is defeat the opposition in Benghazi and everything will return to normal -- I'm not entirely sure that's a view that I would subscribe to," said David Hartwell, Middle East analyst with IHS Global Insight.
"I think there are serious question-marks about the long-term survivability of his regime."
In the past few weeks, Western governments, Russia and the United Nations have frozen the assets of Gaddafi, his family and the Libyan government, implemented arms embargoes and imposed travel bans.
As he watches this, Gaddafi is likely to be feeling a sense of deja vu.
Starting in the 1980s, Western states -- and later the UN and European Union -- slapped sanctions on Libya over its banned weapons programme, support for militant groups and the December 21, 1988 bombing of Pan Am flight 103 over Lockerbie.
Throughout those years, Libya's economy stagnated, but Gaddafi was able to retain political authority at home by casting himself as the scourge of the West and Israel.
Even today, he uses the wrecked former home in Tripoli that was bombed by U.S. jets in 1986 as the backdrop for some of his speeches.
He may try to do the same thing now that he is facing sanctions again, said Mohammed El-Katiri, Middle East analyst with Eurasia Group.
"It is a problem economically speaking but on the political front ... he might capitalise on that to build up his profile," said El-Katiri. "It will give him legitimacy."
Surviving sanctions will not be straightforward. Strong economic growth in the seven years since sanctions were lifted has given many Libyans higher incomes and access to foreign consumer goods -- things they may resent losing.
In an age when Twitter and Facebook give Libyans access to the outside world it may be more difficult to sustain the narrative of Gaddafi as Arab nationalist hero.
But the evidence from the streets of Tripoli is that many people still believe in it, while those who do not are too frightened to speak out.
Sanctions may not really bite unless they extend to an oil embargo, depriving Libya of its principal source of revenue.
The sanctions of the 1990s froze Libya's foreign assets and limited its ability to improve its oil infrastructure but, significantly, allowed it to continue to sell oil.
Today's governments, fearful that high oil prices will stifle halting economic recoveries, will be feeling huge domestic pressure to keep the oil flowing.
"I think we have seen over the last few days there was a lack of consensus over economic sanctions," said El-Katiri.
"Economic interests would like to have a resumption of production and exportation as soon as possible ... and that will give him (Gaddafi) access to funds."
Even if an oil embargo is imposed, former Iraqi leader Saddam Hussein demonstrated that this can be circumvented through smuggling and lax policing.
Nearly all of Libya's oil is exported via its Mediterranean ports, making it easy in theory for nearby European states to detect any embargo-busting from the coast.
However, Libya could find harder-to-police export routes -- overland via its southern border with fellow oil exporter Sudan, for example -- that might allow it to sell just enough to sustain Gaddafi's rule.
Just as he is familiar with sanctions, Gaddafi also has experience of containing domestic unrest.
In the 1990s, Islamist militants launched an armed insurgency in the east of Libya.
Gaddafi responded by arresting thousands. Many never came out of prison alive, including more than 1,000 prisoners shot dead in clashes at Abu Salim prison, near Tripoli, in June 1996.
Rights groups say Libyan authorities are again using their tried and tested methods of intimidation. They say there has been a wave of arrests and disappearances in the past few weeks in the capital, Tripoli, designed to quash protests.
But Benghazi, Libya's second city, is now a very different proposition.
Before this revolt there was widespread antipathy in the city towards Gaddafi. Now many residents say they despise him. If his forces kill more people fighting to retake the city, passions will run even higher.
"(The 1990s insurgency) wasn't as serious as this one ... This uprising is clearly more of a threat. That makes re-establishing control much more difficult," said IHS Global Insight's Hartwell.
"Even if he does beat the opposition militarily -- by that I mean in the ... campaign we're in at the moment -- ... one still assumes he is going to be faced with a pretty prolonged and major insurgency."
Writing by Christian Lowe; Editing by Kevin Liffey and Giles Elgood