On Tuesday, the biggest party Libya has ever seen will begin. Tripoli is being scrubbed up for the occasion: palm trees have been planted, heaps of rubbish trucked away, crumbling buildings torn down. Billboards and posters that read, "Without You the Impossible Would Not Happen", pay homage to the ego of the man at the centre of it all, Col Muammar Qadafi. Nearly every head of state has been invited to celebrate the 40th anniversary of the bloodless military coup that brought Qadafi to power.
The occasion is also meant to be a showcase for the careful transformation in recent years of Qadafi's image, from "mad dog of the Middle East" fame and international outcast to acceptable, if oddball, statesman who brings his own Bedouin tent to sleep in during state visits to European capitals. A statesman whose country happens to have vast oil reserves. How many of the invited guests will turn up to the party remains to be seen because the blossoming love affair between Qadafi and the West has hit a sour note as of late, thanks to the al Megrahi affair.
Abdelbasset Ali al Megrahi, the Libyan intelligence agent and only person to be convicted of the 1988 Pan Am airline bombing over Lockerbie, Scotland, which killed 270 people, was given a hero's welcome in Libya after being released from a Scottish prison on compassionate grounds earlier this month. The British government hoped al Megrahi, who is suffering from cancer and has been given three months to live, would arrive quietly and the business of doing business with Qadafi would continue.
But it seemed Qadafi, who has built an entire career, indeed a brand, on standing up to real or perceived bullies, couldn't help himself. Al Megrahi was flown home on a private jet and met by a jubilant government delegation on the tarmac. International outrage was swift and predictable. It was a classic Qadafi moment. Qadafi was born in 1942; his father may have been a goat herder, and he grew up near the Sirte desert. As a young man he admired the Egyptian leader and pan-Arab nationalist Gamal Abdel Nasser. After graduating from a military academy in 1965 he was sent to England to attend what is now the Joint Services and Command Staff college to train as an officer.
He returned to a Libya angry at the corruption of the pro-western monarchy, humiliated by Israel's victory over the Arab armies in the Six Day War of 1967 and bitter over Italy's colonial legacy. On September 1, 1969, he led a group of military officers and overthrew King Idris I. Barely a shot was fired. Libyans were jubilant. The band of officers chanted slogans of "unity, freedom and socialism", but as a taste of what was to come, added that anyone who disputed these ideals would be "crushed ruthlessly and decisively".
The Italians were kicked out and the bones of their colonial ancestors dug up and tossed away. Qadafi was 27. The following year he took the title of prime minister, although today he does not actually hold any office and is officially referred to as Brother Leader and Guide of the Revolution. The Brother Leader, wearing his favoured safari suits, spent the 1970s refashioning Libya according to the principles of his Green Book, which advocated a blend of socialism, nationalism and Islamic values.
The philosopher-king envisioned a nation governed by thousands of committees which were supposed to debate the future of the country so long as they refrained from criticising the system. Instead it prompted a long economic and cultural decline and bureaucratic chaos. Public services are still in a terrible state and corruption rife. If the first decade of his rule was defined by his attempts to merge Libya with various Arab countries, including Tunisia, Egypt, Syria and bizarrely, China, then the 1980s was the period where he truly became a pariah.
Britain and America accused him of financing and arming the IRA and the Palestinian Liberation Organisation, as well as a host of African despots terrorising their countries. Britain cut off diplomatic ties in 1984 when Yvonne Fletcher, a police officer, was shot dead while patrolling anti-Qadafi protests in front of the embassy in London. His relationship with America was personal and torturous. After the 1986 bombing of a Berlin nightclub which killed three US military personnel, Ronald Reagan, who gave him the "mad dog" nickname, retaliated. US air force bombers hit residential and military areas of Tripoli and Benghazi, killing 101 people.
Qadafi survived an air raid on his own home, but his adopted daughter was killed. He was shaken by the event. The UN slapped sanctions on Libya in 1992 for failing to hand over al Megrahi and another suspect in the Lockerbie attack. The sanctions hit the country deeply but he could hardly turn to Arab countries for help. Indeed, no Arab League summit has ever been complete without a piece of Qadafi theatre: he has worn a white glove to avoid shaking the bloodstained hands of Arab leaders; his female Amazonian bodyguards have tussled with Egypt's mustachioed security men; he throws insults at Saudi leaders.
In the first decade of this century he has sought to make amends for the past. When al Megrahi was finally handed over and found guilty in 2001 by a Scottish court, the detente with the West began. The UN voted to lift sanctions in 2003, the same year he agreed to give up Libya's weapons of mass destruction programme. With the money pouring in from oil, he compensated French relatives of those who died in a passenger aircraft shot down over the Sahara, as well as the victims of a Berlin nightclub bombing.
The relatives of the Lockerbie attack received US$2.7 billion (Dh10bn) from Libya, although Qaddafi has never actually admitted to having a role in the tragedy. Rather, he took responsibility for the "actions of its officials". The returns for Libya have been great. A queue of prime ministers and presidents from France, Britain, Canada and Italy, with dozens of executives in their wake, have cut a path to Tripoli to do business.
British Gas, BP and Dutch Shell have all signed billion-dollar deals. Italy, once the hated colonial overlord, is now Libya's biggest trading partner. When the self-proclaimed "simple Bedu" travelled to the European Union in 2004 for his first official visit he arrived with two aeroplanes - one for his entourage and second for his white stretch limousine. During one lunch he was served date soufflé, perhaps a gesture of the West's willingness to meet him halfway.
"Libya, which led the liberation movement in the third world, has decided to lead the peace movement all over the world," he declared. With his raven locks, dark glasses and flowing robes, Qadafi resembled an ageing African rock star. He has also turned away from uniting the Arabs and instead, in his capacity as head of the African Union, wants to see a "United States of Africa", with one passport, one currency and one leader.
America and Britain have restored diplomatic ties. The anti-imperialist socialist became a capitalist. Human rights groups, however, have complained that economic liberalisation has not resulted in political freedoms. Dissenters are not tolerated. But no matter. Qadafi has been astute enough to capitalise on the West's angst about the links between poverty and religious fanaticism. When five Bulgarian nurses and their Palestinian colleague were released in 2007 after being accused of deliberately infecting more than 400 children with HIV, the French president Nicolas Sarkozy agreed to give Libya access to nuclear technology. Greenpeace criticised the decision.
"If we do not give the energy of the future to the countries of the southern Mediterranean, how will they develop themselves? And if they do not develop, how will we fight terrorism and fanaticism?" Sarkozy asked. Qadafi released the nurses and doctor on the condition that they serve jail terms at home. So he was incensed when instead they were greeted by an EU delegation and the president of Bulgaria.
It explains why al Megrahi, who has maintained his innocence, was given the red carpet treatment: Qadafi's Arab pride was injured. "Why didn't we hear these objections on the exoneration of this condemned team? Are we donkeys but they are humans?" he asked. The French gritted their teeth when he lectured them about human rights, the Italians were bemused when he turned up in Rome with a photograph pinned to his chest of a Libyan guerrilla fighter hanged in 1931 by Italian colonial rulers.
But when his son and possible successor, Saif al Islam, said that Libyan-British business deals were on the table during every discussion of al Megrahi's release, it was a step too far. Whether or not al Megrahi will attend the 40th anniversary celebrations next week and stand on stage with Qadafi is a matter of much speculation. If he does, it will be a sign that Qadafi's transformation, perhaps, is not yet totally complete.