The US has renewed full diplomatic ties with Libya, ending more than two decades of fraught relations between the two countries. Here is a brief history of US dealings with Colonel Muammar Gaddafi's Libya.
CONFRONTATION: 1970 - 86
The US severed all diplomatic relations with Libya in 1980, branding Col Gaddafi's government a sponsor of terrorism. Months earlier, the US embassy in Tripoli was ransacked by people demonstrating in support of the Iranian revolution.
The move capped a decade of steady deterioration in US-Libyan relations.
Since seizing power in 1970, Col Gadaffi had pursued Arab nationalist policies. Resources were brought under state control and alliances forged with nearby Arab nations.
Col Gaddafi also expelled US oil firms that had invested in the country and banned US military vessels from Libyan waters.
In 1981, two Libyan fighter aircraft were shot down by the US over the Gulf of Sirte. Libya said US jets had violated its airspace.
In 1986, the US tightened its economic sanctions against Tripoli, freezing Libyan assets in US banks. A naval clash with US forces in the Gulf of Sirte left 58 Libyans dead, according to Tripoli.
HOSTILITY: 1986 - 99
On 15 April 1986, US President Ronald Reagan ordered his aircraft to bomb Tripoli, the town of Benghazi and bases used by the Libyan military.
At least 100 people died in the attacks, many of them civilians - including Col Gaddafi's adopted daughter.
The US said the raid was in response to the bombing of a Berlin nightclub, frequented by US soldiers, that killed at least 40 Americans.
"When our citizens are attacked or abused anywhere in the world on the direct orders of hostile regimes, we will respond so long as I'm in this office," Mr Reagan said.
A presidential spokesman said efforts had been made to spare civilian casualties.
In 1988, a Pan Am passenger jet exploded over the town of Lockerbie in Scotland, killing 270 people. An investigation was launched and in 1991, the US said it had evidence Libyan agents planted a bomb on the plane.
The UN Security Council met in 1992 and imposed sanctions on Libya, demanding it hand over the Lockerbie suspects. The sanctions crippled the Libyan economy.
RECONCILIATION: 1999 - 2006
In April 1999, Col Gadaffi handed over two men accused by the US of planting the Lockerbie bomb. One of the two Libyan agents was tried and convicted for the bombing by a Scottish court. His co-accused was set free.
Libya also said it accepted legal responsibility for the Lockerbie attack and agreed to pay $2.7bn in compensation to the victims' families in 2003. The UN responded by lifting sanctions against Tripoli.
In the same year, Libya announced it would abandon efforts to develop weapons of mass destruction and allow inspectors into its facilities.
A foreign ministry spokesman in Tripoli said the arms race contradicts Libya's "great concern for a world that enjoys peace and security".
The announcement was welcomed in Washington and President George W Bush formally lifted a trade embargo on Libya.
In 2002, the US and Libya had revealed they had been in talks aimed at improving ties. Some diplomatic links were restored in 2004 and the US eased restrictions on travelling to Libya. William Burns became the first high-ranking US official to meet Col Gaddafi in Tripoli.
Libyan oil exports to the US were resumed and in 2005, US energy companies invested in the country for the first time in more than two decades.
In May 2006, Washington announced the full resumption of diplomatic ties with Libya.