'It would be fair to say this all happened rather quickly' says key Whitehall source of Gaddafi ally's defection

For a man so cultured in the dark arts of international diplomacy, perhaps it should not have been a surprise that Moussa Koussa engineered his escape in the way that he did.

Koussa, who spent Thursday being debriefed by MI6, appears to have taken the Libyan regime completely by surprise - and perhaps the British too.

The flight that took him from Tunisia to Farnborough on a rainy Wednesday afternoon was the last leg of a choreographed getaway that he may have planned for weeks, but dared not confide to anyone. Certainly he told nobody in Tripoli, the city in which he was born, and which he left on Monday in a cavalcade of armoured limousines, having convinced the regime that he needed medical treatment across the border.

Once in Tunisia he made contact with British officials, but had no time to arrange for them to escort him back to the UK, or to negotiate immunity from prosecution. He left in a privately hired jet - not one provided by the British military - from the airport at Djerba, and was spirited away to a safe house when he landed several hours later.

Whitehall officials confided on Thursday that Koussa had made it here "under his own steam. He let it be known he was on his way. We knew he was coming." Another source added: "It would be fair to say this all happened rather quickly."

If William Hague knew, he did not let on on Thursday, though he admitted he spoke to Koussa on Friday last week.

A friend of Koussa's family shed a little more light on the extraordinary escape, and the anxiety that Koussa will now be feeling. "He has left Tripoli, but his wife and children are still there," said Noman Benotman, a senior analyst at the Quilliam Foundation in London. "I fear for his family, and what kind of retaliation there might be against them."

Benotman said he had been in Libya in February, and it was clear to him then that Koussa was unhappy and looking for a way out. "I knew he was planning this, but I kept it to myself. This may have come as a surprise to Britain, but it did not come as a surprise to me."

Though the manner of his defection remained unclear, and there was speculation about whether he still retained the trust of Colonel Gaddafi, there is no such ambiguity about the character of the man, or the pivotal role he has played for Libya on the international stage over the past 30 years.

In the pariah years, Koussa was accused of being one of the architects of Libya's terror; when the country came in from the cold, it was Koussa who brokered the deal with the west. His fingerprints are on every major issue of the last 20 years, his discreet intervention a possible factor in the release of the Lockerbie bomber Abdelbasset al-Megrahi.

Those who know Koussa, or who have negotiated with him, say he oozes a casual, quiet menace - he's not a man to blink first, even in the company of MI6 and CIA agents, with whom he has had regular contact since the 1990s.

US diplomats recognised his overarching influence, describing him in cables published by WikiLeaks as "the rare Libyan official who embodies a combination of intellectual acumen, operational ability and political weight".

Certainly, few people know Gaddafi's mind as well as Koussa, whose association with the Libyan leader can be sourced to a 209-page master's thesis written about the dictator in 1978 by a graduate at the University of Michigan.

The student, according to those who taught him, took great care with his work, interviewing Gaddafi twice, his family, childhood teachers, friends, and military colleagues, allowing him to paint a vivid picture of the influences that motivated the young revolutionary.

The author was Koussa, then a 30-year-old sociology student, who would have had a career in academia had he not been persuaded by Gaddafi to abandon plans to study for a doctorate to become one of his closest confidants.

"If he had become a professor or a social planner, he would have done very well," said Christopher K Vanderpool, speaking to the Los Angeles Times. "He was a very bright guy."

But Koussa took an entirely different career path, and more than any other Libyan official he came to embody the evolving relationship between Britain and the Gaddafi regime.

After leaving university, Koussa was sent to London to head the People's Bureau in St James's Square, London - in effect the country's ambassador in the UK. The role meant he was in charge of security at all Libyan embassies in northern Europe, and he was known to be involved in buying weapons.

He was also charged by Gaddafi with liquidating what were called - in chilling Libyan officialese - "stray dogs" who betrayed the 1969 revolution.

Oliver Miles, a former British ambassador to Tripoli, remembered him then as "straightforward and reliable". "I found him a perfectly reasonable person to deal with. He struck me first of all as being a committed revolutionary. I don't think he was a diplomat in the sense of being a member of the diplomatic service. I think he was a revolutionary guy parachuted into a diplomatic position."

Which would help to explain why, in June 1980, he was expelled from the country on the advice of MI5.

Speaking to the Times outside his office, Koussa called publicly for the murder of two dissidents, and said Libya was thinking of co-operating with the IRA. "We don't like breaking the law here," he said. "But we are fighting these people because they worked against our revolution."

The outburst led the British media to characterise him as "the envoy of death" and he was given 48 hours to go.

Back in Tripoli, Koussa remained at the heart of the Gaddafi regime, liaising between the revolutionary committees and foreign liberation movements.

He embraced a range of causes in Africa and from Palestine to the Philippines.

Crucially, it remains unclear whether he was involved, as has often been rumoured, in the Lockerbie bombing in 1988 or in an attack on a French plane over the Sahara the following year.

Koussa has denied knowledge of either atrocity, but the suspicions persisted, and were hardly dulled when in 1994 he was appointed head of Libya's External Security Organisation, during a period in which the regime was constantly being linked to terrorist activity.

His rehabilitation - in diplomatic circles at least - began within days of 11 September, when US demands for intelligence outweighed its queasiness about dealing with the Gaddafi regime.

Koussa is said to have flown to London shortly after the atrocity, bringing with him files about known al-Qaida terrorists; he was also Gaddafi's special envoy in the negotiations to give compensation to relatives of the 270 passengers and crew killed at Lockerbie.

Jim Swire and Robert Black, two of the most prominent campaigners on Lockerbie, who met him on several occasions during trips to Libya, yesterday described him "the scariest man" they had ever come across.

He was, however, a man that the UK could do business with, becoming a key member of the team that negotiated the surrender of Libya's WMD programmes, as well as helping to unravel the nuclear smuggling network of the Pakistani scientist AQ Khan.

The exchange of information was Gaddafi's way of avoiding the regime change that had just befallen Saddam Hussein.

Now part of Whitehall folklore, Koussa was a key figure in the secret meeting at the Travellers Club in Pall Mall - favourite haunt of spies - when the deal was done.

Britain's chief interlocutor at the talks was Sir Mark Allen, a veteran Arabist who was deputy head of MI6. Steve Kappes, now deputy director of the CIA, was part of the circle of trust too.

After flying to and from Libya to lay the ground work for the deal, it was Allen who chaired the critical discussion with Koussa in London on 16 December 2003.

In a private room in the club, over a long lunch, the talks continued until 6pm until an agreement was reached - Libya to abandon its weapons programme, in return for sanctions being lifted.

Within a month, the US and the UK had resumed relations.

Sir Mark, having failed to secure the top job at the Secret Intelligence Service, went on to join BP as a special adviser, helping the company to win huge oil contracts with Gaddafi.

Koussa's long-standing link with Britain's intelligence service and the CIA continued, with Libya becoming an ever closer and valued ally in the US-led "war on terror" - a point Gaddafi peevishly reiterates as evidence of bad faith towards him. In his memoir, the former CIA director George Tenet recalls how Koussa was once asked if Libya had had any dealings with a Pakistani charity thought to be helping al-Qaida obtain WMD.

"Yes, they tried to sell us a nuclear weapon," Koussa replied. "Of course, we turned them down."

Koussa also played a role in discussions about the release of Megrahi, the Lockerbie bomber, in 2009. Minutes of meetings held with Scottish officials that year show Koussa put pressure on the Scottish officials to release the Libyan, saying that his "death in Scotland would not be viewed well by the Muslims or the Arabs. Nor would it be good for relations."

But the heavy lifting was actually done by Koussa's deputy, Abdel-Ati al-Obeidi, and the credit was claimed by Saif al-Islam, Gaddafi's son.

Early in the current Libyan crisis, British officials publicly signalled an attempt to "reach out" to persuade senior Libyans to defect. For obvious reasons, no names were mentioned. But Koussa was always going to be a target.

In recent times he sometimes appeared at odds with the regime he has been such an integral part of.

According to a leaked US embassy cable, Koussa privately expressed exasperation with one of Gaddafi's sons, Mutassim. There have even been stories that another of Gaddafi's sons punched him in the face after an argument.

At an international summit in Tripoli in December he cut a forlorn figure, alone and smoking in the public areas of the summit venue while Gaddafi's intimates were cloistered in a private room.

Saad Djebbar, an Algerian lawyer who knows Koussa well, said he had sensed Koussa's unhappiness with the regime when he met him several times last year.

"He looked helpless, he was excluded and frustrated at the way everything was concentrated in the hands of the Gaddafi clan and tribe."

But defection was another step - and his record is clearly problematic, which is why the foreign secretary William Hague promised there was no deal to give him immunity from prosecution.

Though the families of the Lockerbie victims will have welcomed that, Djebbar questioned the wisdom of stating it explicitly. "There might have been wrongdoing in the past but he has done the right thing on this occasion in terms of Libya's future. People who abandon Gaddafi are doing the right thing. This is not the time to talk about retribution or punishment. What is of paramount importance is to prevent the division of Libya and stop it becoming another Somalia."