When Muammar Gaddafi told the world he was a changed man, some leaders were sceptical. Others, like Britain's Tony Blair, were quicker to see the benefits of rapprochement with the oil-rich nation.
Now, as Gaddafi's regime crumbles, questions are being raised about whether Britain, the United States, and others were too quick to embrace a volatile despot linked to terrorism and oppression as they sought lucrative business deals.
Those deals worth billions are now in jeopardy as Libya hurtles toward civil war. The strategic decision to build ties with the likes of Gaddafi, Egypt's Hosni Mubarak, and Tunisia's Ben Ali also threatens to further inflame anti-Western anger in the Arab world.
Blair's role was particularly vital in Gaddafi's international rehabilitation.
The former British prime minister flew to Libya in 2004, holding talks with Gaddafi inside a Bedouin tent. He praised the leader for ending Libya's nuclear and chemical weapons program and stressed the need for new security alliances in the wake of the September 11 terror attacks. British commercial deals soon followed.
Britain sold Libya about 40 million pounds (NZ$86 million) worth of military and paramilitary equipment in the year ending September 30, 2010, according to Foreign Office statistics. Among the items: sniper rifles, bulletproof vehicles, crowd control ammunition, and tear gas.
"What did the Foreign Office think Colonel Gaddafi meant to do with sniper rifles and tear gas grenades - go mole hunting?" asked Britain's Guardian newspaper.
Although Britain's current government led by David Cameron has revoked dozens of export licenses to Libya in the wake of the Libyan violence, many say the very weapons and equipment Britain has sold to Libya are being used against the country's people.
Britain's elite Special Air Service, or SAS, also participated in recent training for Libyan soldiers in counterterrorism and surveillance. Robin Horsfall, a former SAS soldier, said at the time that the training was a mistake: "People will die as a result of this decision," he warned.
Since Scotland's release of Abdel Baset al-Megrahi - the only man convicted in the 1988 bombing of Pan Am Flight 103 over Lockerbie, Scotland - US lawmakers have accused Britain of backing the Libyan's freedom in exchange for oil deals. The former Libyan intelligence agent was accused of placing a bomb on the plane. The bombing killed 280, many of them American students.
"Muammar Gaddafi is a terrorist - plain and simple," said US Senator Robert Menendez, a Democrat from New Jersey, after Libya's former Justice Minister Mustafa Abdel-Jalil told the Swedish tabloid Expressen this week that Gaddafi had personally ordered the Lockerbie bombing.
But Washington has also cultivated ties with Gaddafi.
In 2008, former president George W. Bush sent his top diplomat Condoleezza Rice to Libya for talks with Gaddafi. She called the trip "historic" and said it had "come after a lot of difficulty, the suffering of many people that will never be forgotten or assuaged."
The same year, Texas-based Exxon Mobil signed an exploration agreement with the Libyan National Oil Corp. to explore for hydrocarbons off the Libyan coast.
The US also approved the sale of military items to Libya in recent years, giving private arms firms licenses to sell everything from explosives and incendiary agents to aircraft parts and targeting equipment.
The Bush administration approved the sale of $3 million of materials to Libya in 2006 and $5.3 million in 2007. In 2008, Libya was allowed to import $46 million in armaments from the U.S. The approved goods included nearly 400 shipments of explosive and incendiary materials, 25,000 aircraft parts, 56,000 military electronics components and nearly 1,000 items of optical targeting and other guidance equipment.
The US State Department has not yet provided figures for material licensed to Libya during the Obama administration. But according to one US government official, Congress spurned a 2009 Obama administration request for approval of a license to allow the private shipment of M113 armored personnel carriers.
The official, who insisted on anonymity because the licensing process is classified, would not detail the number of armoured cars sought by Libya. Libyan military officials had pressed US officials as far back as 2007 for the cars and troop-carrying Chinook helicopters, but the Bush administration balked at the requests, the official said.
UN High Commissioner for Human Rights Navi Pillay recalled that US leaders discouraged her from pressing Libya on its poor human rights record.
"In the last few days (of the Bush administration) I did meet with some representatives of the US administration," Pillay told The Associated Press in an interview. "They said to me the human rights record of Libya is fine so you needn't touch that."
Many in the intelligence community say they viewed Gaddafi's supposed transformation with cautious optimism at the time.
"He said he wanted to fight extremism, which we viewed positively much like the Americans," Ilan Mizrahi, former deputy in Israel's Mossad intelligence agency told the AP on Wednesday. "But we also said to be cautious of these moments of sanity."
Few European leaders have escaped the wrath of newspaper editorials or embarrassing photo montages with the eccentric leader. Former British prime ministers Blair and Gordon Brown, France's Nicolas Sarkozy, Germany's then-chancellor Gerhard Schroeder and Italy's Premier Silvio Berlusconi are among them.
The West's dance with Gaddafi and others has already angered some protesters, who feel big powers kept their oppressors in power and enriched them, while cheating ordinary people out of the riches that foreign oil companies have garnered.
For Italy, Libya's proximity to Italian islands and the potential for a refugee influx has long encouraged Rome to foster close ties. Italy, an energy-poor country, also has a large stake in the North African nation's oil production.
For Germany, Schroeder's 2004 visit followed Libya's agreement to pay compensation to victims of a 1986 disco bombing in West Berlin. During that trip, an oil well run by Germany's Wintershall was inaugurated.
France, too, courted Gaddafi in 2007. The leader pitched a tent in the elegant garden of the official guest residence in Paris and stayed three days longer than expected. Sarkozy said of the visit, "If we don't welcome those who take the road to respectability, then what do we say to those who take the opposite road?"
But for Britain, Libya's revolt has been more acutely embarrassing.
Gaddafi once supplied the IRA with weapons and explosives used to kill hundreds in Northern Ireland and Britain, and one of his henchmen was accused in the killing of a British policewoman outside Tripoli's embassy in London in 1984 during a demonstration.
He has also been repeatedly linked to the Lockerbie bombing, though the allegations have never been proven.
Still, when the cancer-stricken Lockerbie bomber was released from prison on compassionate grounds in 2009, his return to Libya was broadcast on live television. Gaddafi and his son threw him an extravagant welcome home party. Family members of the Lockerbie bombing victims said the display was insulting.
At the time of al-Megrahi's release, critics said his freedom was awarded to pave the way for more British oil and trade agreements. Libya produces about 1.6 million barrels of crude per day and has the biggest oil reserves in Africa. It is also the largest exporter to Europe.
In 2007, shortly after Blair re-established relations, BP signed a deal worth at least $900 million to explore Libya. If Gaddafi's regime collapses, there are fears another leader could chooses not to honor the contracts, re-negotiate them or kick foreign oil companies out altogether.
British trade with Libya is also worth around 1.5 billion pounds a year. British exports to the country last year were worth 377.1 million pounds. More than 150 British-based companies operate in Libya, including British Airways, HSBC and Barclays banks and clothing chain Marks & Spencer.
Gordon Brown's spokeswoman Nicola Burdett declined comment on the recent violence or Brown's dealings with Gaddafi when in office. The pair held talks on the sidelines of the 2009 G-8 summit in L'Aquila, Italy. At the time, Brown praised the Libyan leader's decision to scrap his nuclear weapons program.
Blair's office said the former British leader believed he was right to restore relations with Libya.
Blair's spokesman also refused direct comment but made reference to a statement released by his office.
The rest of the world benefited hugely from "the change in Libya's position from a state that was developing nuclear and chemical weapons and sponsoring terrorism, to a state that in 2003 gave up WMD and is now co-operating in the fight against terror," Blair's office said in a statement.
"However none of that justifies the violence internally."
Watchdogs have urged European nations to seize Libyan assets, and criticised their eagerness to court Gaddafi.
"It is difficult to draw lessons in the midst of historic changes, but EU governments have been complacent," said Transparency International's deputy managing director Miklos Marschall. "Short term economic benefits have been considered and very basic principles have been sacrificed."