By Gerald Butt
Middle East analyst
Major changes have happened in Libya over recent years - ones that not even the closest observer of the ruling circle in Tripoli could have predicted.
Looking and sounding increasingly weary, Colonel Muammar Gaddafi, 64, seems to have come to terms with his own mortality.
With the wisdom of years perhaps, the Libyan leader has tried hard to turn a new page and clean up the image of his country as a haven for revolutionaries.
The stamp of Colonel Gaddafi is imprinted on every aspect of Libyan life
The decision of the US to restore full diplomatic relations with Libya marks the crowning success of his efforts to have his country accepted back into the international community.
He would clearly like a sceptical world to see this as final proof that he and his country have cast aside their rebellious streak.
More than three decades ago, Col Gaddafi led a military coup that toppled King Idris and ended the monarchy in Libya. But since then, he has ruled his country in the style of the most eccentric of absolute monarchs imaginable.
Col Gaddafi's Libya is unlike any other country in North Africa, the Middle East or the world at large. It has the stamp of its leader imprinted on every aspect of its life - even its name.
Aside from monarchies and sheikhdoms, every other Arab state is happy to call itself a republic - in Arabic, "jumhuriyya".
But in 1977, Col Gaddafi coined a new word in Arabic to describe his new Libya, governed - in theory at least - by popular committees. It was, he decreed, a "jamahariyya" - a state of the masses.
Col Gaddafi's political and social theories are set out in rambling fashion in three volumes of his Green Book, completed in the late 1970s.
Nearly four years after coming to power, he launched what he called a cultural revolution.
The main thrust was to remove all traces of imported ideologies like capitalism and communism, and all signs of foreign influence, before building a new society based on the basic principles of Islam and home-grown socialism.
Even though Libya enjoys a vast oil income, Colonel Gaddafi himself purports to enjoy a simple lifestyle
As part of this process, corrupt officials were punished and politically unsound books burned.
As popular committees were formed, the Revolutionary Command Council was scrapped and effective authority taken from governors, ministers and senior officials.
But despite the cosmetic changes, ultimate power to push through revolutionary changes rested in the hands of Col Gaddafi alone.
Even though Libya enjoys a vast oil income, Col Gaddafi himself purports to enjoy a simple lifestyle.
He greets foreign visitors in a traditional Bedouin tent, and likes to spend long periods in the desert.
Colonel Gaddafi has won some respect for having the courage to speak his mind without fear
This, he says, is because of his affinity with the desert region where he was born in 1942 to a Bedouin family. He grew up in an atmosphere of rebellion.
Libya has been shaped by its leader more than most countries. Members of his family took part in the armed struggle to end Italian colonial rule, and his father and one of his uncles served prison sentences.
The young Gaddafi was strongly influenced in his formative years by the pan-Arab nationalism espoused by the charismatic Egyptian leader, President Gemal Abdel-Nasser.
During the Suez crisis of 1956, Gaddafi, aged 14, took part in anti-Israeli demonstrations. Later, at military college, he began forming plans for toppling the monarchy.
Gaddafi's support for armed groups led to confrontation with the West
After further army training in Britain, he returned to Benghazi in eastern Libya, forming a secret group which planned the forthcoming coup.
On 1 September 1969, Col Gaddafi personally led an attack on the Benghazi radio station that signalled its start. Under the slogan, "socialism, unity and freedom", a new chapter in Libya's history began.
In opposing what he said was the pernicious influence of the West on the Arab world and in pursuit of his desire to destroy Israel, Col Gaddafi has, at times, given financial help to a broad range of Palestinian and other armed groups around the globe, including the Irish Republican Army (IRA).
Alleged Libyan involvement in terror attacks in Europe in 1986 led to US military strikes against Tripoli.
All the while, the Libyan leader was preaching the need for Arab unity.
After the death of President Nasser in 1970, he had assumed it was his natural role to step into the shoes of the former undisputed leader of the Arabs.
Three decades later, the bitterness he felt at being rebuffed time and again in his efforts at promoting unity boiled over into a public rejection of the Arab world as a whole.
He said in an interview in 2001 that Africa "is closer to me in every way than Iraq or Syria".
From the perspective of other Arab leaders, Col Gaddafi has always been too quixotic and unpredictable to be taken seriously. As a result, they were not prepared to translate the sympathy they felt for
Libya, as sanctions were imposed after the Lockerbie bombing, into action to help Col Gaddafi.
They believed that his meddling with militant groups and such acts as the murder of British police officer Yvonne Fletcher by staff firing from inside the Libyan People's Bureau in London in 1984 made Libya a country that was best kept at arm's distance.
Among the Arab people, the judgment has been less harsh.
Col Gaddafi won some respect for having the courage to speak his mind without fear.
He has generally struck a common chord, for example, in denouncing the deals that a number of Arab leaders have struck with Israel as a shameful sell-out.
But at the same time Arabs were aware that the views of this maverick veteran were as likely to have as much impact on real life as his former dream of regional unity.
So they were as surprised as anyone when Libya admitted responsibility for the Lockerbie and French airliner bombings.
More surprising still was the decision in December 2003 to abandon his country's weapons of mass destruction programme - a pragmatic move that almost certainly saved his political life and allowed Libyans to engage with the world again.
Now that Col Gaddafi's political and diplomatic rehabilitation is complete, Libyans are waiting to see what changes might be in store within the country itself.
Over recent months there have been moves towards economic reform. American oil companies have returned to acreage they left in 1986, and firms from around the world are competing fiercely for new oil and gas contracts.
But politically, change seems to be slower. Even today, committees around the country nominally hold power, while real power still rests in the hands of the country's veteran leader.
The signs are, too, that another member of the Gaddafi family - the colonel's second son, Seif al-Islam - is a growing power in the land.
Col Gaddafi is intent, perhaps, to ensure that his idiosyncratic years as leader are left as a stamp on the country by the rise to power and possible succession of one of his sons.
Maybe Seif al-Islam will be the next leader. But Libya will never again be the way it was for most of his father's rule.