When Libya's former spy chief flew to Mauritania last week, he was looking for a safe haven. Instead the man known as "Muammar Gaddafi's black box", the last of the fallen dictator's henchmen still at large, walked into a trap set by French and Mauritanian intelligence.

Gaddafi's head of intelligence, right-hand man and brother-in law, Abdullah al-Senussi, was arrested in the Mauritanian capital, Nouakchott, last week. The still murky circumstances of his capture set Libya on a collision course with France and the International Criminal Court, which both want Senussi.

Libya wants Senussi to stand trial in Tripoli for a catalogue of crimes. It sent a delegation to Mauritania but it returned without him after officials there said the legal formalities for his extradition were not complete.

Western and Arab powers are all too aware of the secrets Senussi holds, and are anxious to deny him the opportunity to say what he knows in public and expose the Arab and Western governments that used Gaddafi to plot against their enemies.

"He is Gaddafi's black box," said Noman Benotman, a senior Libyan analyst at the Quilliam Foundation. "He knows all the secrets about the dirty deals, plots to kill - and even what underwear Gaddafi wore."

Senussi, 62, believed to be held at the headquarters of the Mauritanian security service in Nouakchott, is accused of playing a central role in repression and torture under Gaddafi.

He is widely suspected of anchoring high profile conspiracies such as the 1988 bombing over Lockerbie, Scotland, of a Pan Am jet that killed 270 people, the 1989 bombing of a French UTA airliner that killed 170 people, and plots against Arab and African states, including an attempt in 2003 to assassinate Saudi crown prince Abdullah, who is now the king.

THE FRENCH CONNECTION

Senussi is also believed by government officials in Libya to have details of how Libya helped to finance the election campaign that brought French President Nicolas Sarkozy to power in 2007, and of Gaddafi's involvement with Western states.

"He is the main witness to financial corruption and deals which involve many leaders and countries, including France," a senior Arab intelligence source said.

"He knows everything about the Lockerbie bombing, the deal that followed, the UTA, the money trail, Gaddafi's financing of presidents and their electoral campaigns. He was part of the cobweb of financial corruption that existed under Gaddafi for 40 years," the source said.

Benotman said Sarkozy is taking a personal interest in Senussi's arrest, and not just because he wants to shore up his low ratings ahead of next month's presidential election and bring to justice the man who was behind the UTA airliner bombing.

Privately, intelligence sources said, Sarkozy would like to take him into French custody to prevent a public trial in which he would reveal that Gaddafi paid 50 million euros to finance Sarkozy's previous campaign. The funding was organized through a complex and secretive web of banks and companies.

"This is totally false," a French diplomatic source said in response to the claim. "We must let justice take its course. "There is an extradition request and justice must take its course. This is totally absurd."

"We want Senussi to be extradited ... From the moment he is brought to justice he will be able to speak ... These insinuations are nothing but gossip and absurdities. We are in the realm of the conspiracy theory. It doesn't hold up."

In an interview with the Euronews TV channel last year, Gaddafi's son, Saif al-Islam, said Libya contributed to Sarkozy's 2007 election campaign and demanded that the French president return the money to the Libyan people.

He said Libya had details of bank transfers and was ready to make them public in a move designed to punish Sarkozy for throwing his weight behind opposition forces then seeking to topple Gaddafi. In recent election interviews, Sarkozy has vehemently denied he received any such funding from Gaddafi.

"Sarkozy will not be able to sleep in peace until he gets Senussi into France," said the senior Arab intelligence source.

ARAB PLOTS

But Sarkozy, the intelligence sources say, may be acting with Arab allies who would also prefer their habitual plotting against regional rivals not to become public knowledge.

Senussi had been convicted in absentia of the 1989 UTA airliner bombing, Sarkozy's office said. Families of the victims immediately demanded he face justice in France.

"There are many countries, including Arab leaders, who are nervous about Senussi. If he says what he knows it will be a catastrophe for them. They are frightened that he would present some incriminating documents or evidence," Benotman said.

"There are countries which conspired with Gaddafi against other neighboring countries, plotting coups, assassinations and attacks. Senussi used to tape these meetings secretly, deliver the messages and organize the plots," he said, referring to a tape broadcast on a Syrian-based channel in which an Arab leader was heard discussing with Gaddafi a conspiracy against another Arab country.

"Some Arab and African countries entrusted Gaddafi to do their dirty work against their enemies. Senussi was from this close circle who carried out these jobs. Libya had a terrorist network that carried out plots and attacks on behalf of other Arab countries and royals," the Arab intelligence source said.

Senussi would have details of financial and commercial deals, especially those involving defense companies, which many Western governments sought after a thaw in relations with Libya more than a decade ago, the source said.

FRANCE PLAYED KEY ROLE

"France does not want to hand him over to the Libyan authorities. France was behind enticing him to leave Mali and his entrapment," said the intelligence source. "He was in northern Mali under the government's protection. He was drawn to Mauritania by a tribe close to Senussi following a deal by the French and Mauritanian intelligence to lure him to his arrest."

"A French special unit worked on his arrest, establishing contact with a Mauritanian tribe, al-Me'edani, whom Senussi trusted, financed and had given Libyan nationality. The deal was reached by persuading this family to draw Senussi to Mauritania where he was arrested."

The source said Mauritanian President Mohamed Ould Abdel Aziz, a general who toppled his predecessor in a 2008 coup, wanted to repay France, the former colonial power, for backing him after he won a 2009 election decried by rivals as rigged.

France's decision to call him a "key partner" was vital to what eventually became his rehabilitation and which allowed the resumption of IMF programs for the country.

Benotman said Senussi along with Bashir Saleh Bashir, Gaddafi's powerful chief of staff, who was also chairman of the Libyan African Investment Portfolio, an arm of the country's sovereign wealth fund, and a woman, were the three key players who held the secrets, taped meetings, delivered messages and handled the financing of plots.

Libyan government officials say that Bashir - Gaddafi's most powerful adviser for 30 years - was released from a Tripoli jail following his arrest after Gaddafi's overthrow and later appeared in Paris and then in Niger, where he was granted a diplomatic passport and an advisory government role in Niger under pressure from France.

Bashir flew to Mauritania, where he has strong connections, to try to persuade authorities to hand Senussi over to France rather than Libya.

"Nobody knows how Bashir, who was detained in the summer was released, and who was responsible for his release," Benotman said. "The Libyans blame each other. There are several former Gaddafi officials who had been released from jail."

CATALOGUE OF PLOTS

Among the operations Senussi knew about, Benotman and other Arab sources say, were the financing of insurgents in Iraq after the 2003 U.S. invasion, and backing for Shi'ite Muslim groups in Bahrain who opposed the Sunni Al Khalifa royal family to spite Saudi Arabia, Manama's main ally.

"Abdullah Senussi was the anchor, supervisor, facilitator, financier and executor of these plots," said Benotman.

His last intervention was in Yemen to finance and arm the al-Ahmar tribe in fighting the then President Ali Abdullah Saleh, a Saudi-backed figure who was forced out in a popular uprising last year.

A Libyan government source said the handover of Senussi would lead to "the unlocking of many doors".

For decades, Senussi was the keeper of Gaddafi's secrets. He instilled fear and hatred among Libyans before the Libyan dictator was toppled in August.

After the fall of Tripoli, Senussi parted from Gaddafi and escaped across the border into northern Mali. ID:nL6E8EL9N1

The International Criminal Court in The Hague indicted Senussi along with Gaddafi and his son Saif al-Islam last year for war crimes.

Senussi is suspected of a key role in the killing of more than 1,200 inmates at Tripoli's Abu Salim prison in 1996. The ICC has charged Senussi and Saif al-Islam with being "indirect co-perpetrators" of murder and persecution.

France, which led Western backing for the uprising that toppled Gaddafi, said it had cooperated with Mauritania over the arrest and that it would be sending a warrant for Senussi.

"We insist that Senussi is extradited to Libya," government spokesman Mohammed al-Harizy said. "There are demands from the ICC and France to get Senussi, but the priority is to deliver Senussi to Libya."

Doubts have been raised as to whether Libya can successfully prosecute Senussi, but it is clear that he would be a major prize for Tripoli's new rulers.

Hassiba Hadj Sahraoui, Amnesty International's Deputy Director for the Middle East and North Africa, said the Libyan justice system "remains weak and unable to conduct effective investigations into alleged crimes".

But Khaeri Aboshagor, senior representative of the Libyan League for Human Rights, added: "He is a very big fish, and he has a Pandora's box inside his brain. He knows everything about Gaddafi's rule - security and intelligence systems going back 30 years or more."