| Gaddafi blamed the uprising against his rule on both al-Qaeda and a 'colonialist plot'
After 42 years at the helm of his sparsely populated, oil-rich nation, Muammar Gaddafi - the Arab world's longest-ruling leader - lost his grip on power after a six-month uprising.
On October 20, an NTC official reported that Gaddafi had been killed near Sirte after fighters liberated the deposed leader's hometown.
Footage obtained by Al Jazeera appeared to show Libyans dragging the body of their former leader through the streets. Libya's National Transitional Council (NTC) said Gaddafi and his son Mutassim, along with a former aide were buried at a secret location in the Libyan desert.
Since he led a successful military coup in 1969, Gaddafi styled himself as Libya's "brother leader" and the "guide of the revolution", as an almost paternal figure looking after Libya's six million inhabitants.
His relationship with the rest of the world was erratic. For years, Gaddafi was known in the West as a pariah, blamed for the 1988 bombing of a Pan Am jumbo jet over Lockerbie, Scotland, which killed 270 people. After years of denial, Libya acknowledged responsibility and agreed to pay up to $10m to relatives of victims; Gaddafi also declared he would dismantle all weapons of mass destruction.
Those moves eased him back into the international community.
In February, only weeks after street protests brought down the leaders of Tunisia and Egypt, a rebellion against Gaddafi's rule started in the country's east.
Days after it began, Gaddafi gave a televised speech in which he vowed to hunt down protesters "inch by inch, room by room, home by home, alleyway by alleyway". The speech caused anger, helping to fuel the armed rebellion against him.
Gaddafi was born in 1942 in the coastal area of Sirte to nomadic parents. He attended Benghazi University to study geography, but dropped out to join the army.
He came to power in 1969 at the age of 27 after leading a bloodless coup against King Idris.
After seizing power, he laid out a political philosophy based on pan-African, pan-Arab and anti-imperialist ideals, blended with aspects of Islam. While he permitted private control over small companies, the government controlled the larger ones.
The Libyan leader was an admirer of the Egyptian leader Gamal Abdel Nasser and his Arab socialist and nationalist ideology. As a strong member of the Non-Aligned Movement during the Cold War era, Gaddafi tried to mold the Libyan political system in a way which he said was an alternative to both capitalism and communism.
In February, one week into the uprising, Gaddafi vowed to die as a 'martyr' on Libyan soil
Gaddafi played a prominent role in organising Arab opposition to the 1978 Camp David peace agreement between Egypt and Israel.
Later shunned by a number of Arab states, partly on the basis of his views on the Israeli-Palestinian conflict, Gaddafi's foreign policy focus shifted from the Arab world to Africa.
The Libyan ruler argued for the creation of a "United States of Africa" - an idea first conceived by US pan-Africanist Marcus Garvey - in which the continent would include "a single African military force, a single currency and a single passport for Africans to move freely around the continent"
The project did not pan out, although some of its ideas influenced the African Union, which was created in 2002. Gaddafi served as chairman of the African Union from 2009 to 2010.
A 2008 meeting of African monarchs proclaimed Gaddafi the continent's "king of kings".
In 1977 he changed the country's name to the Great Socialist Popular Libyan Arab Jamahiriyah (State of the Masses) and allowed people to air their views at public congresses.
Some critics defined his rule as a military dictatorship, accusing him of repressing civil society and ruthlessly crushing dissidence.
Gaddafi maintained a position of anti-imperialism throughout his rule, supporting independence movements against colonial rule around the world. He allegedly gave material support to groups labelled "terrorists" by numerous wealthy countries, including Colombia's FARC and Northern Ireland's IRA.
Libya's alleged involvement in the 1986 bombing of a Berlin nightclub in which two American soldiers were killed prompted US air attacks on Tripoli and Benghazi, killing 35 Libyans. Ronald Reagan, then the US president, called him a "mad dog".
The 1988 Pan Am bombing over Lockerbie is possibly the most well-known and controversial incident associated internationally with Gaddafi.
At the UN General Assembly in 2009, Gaddafi accused the body of being a terrorism group like al-Qaeda [EPA]
For many years, Gaddafi denied involvement, resulting in UN sanctions and Libya’s status as a pariah state. Abdel Basset al-Megrahi, a Libyan intelligence agent, was convicted of planting the bomb. In 2003, Gaddafi's regime formally accepted responsibility for the attack and paid compensation to the families of those who died.
Gaddafi also broke Libya's isolation from the West in the same year by relinquishing his entire inventory of weapons of mass destruction.
In September 2004, George W Bush, the US president at the time, formally ended a US trade embargo as a result of Gaddafi's scrapping of the arms programme and taking responsibility for Lockerbie.
The normalisation of relations with Western powers allowed the Libyan economy to grow, and the oil industry in particular benefited.
However, Gaddafi and Lockerbie came back into the spotlight in 2009, when al-Megrahi was released from a Scottish prison on the grounds that he was terminally ill and was nearing death. He returned to Libya to a hero's welcome from Gaddafi and many Libyans, sparking condemnation by the US and the UK, among others.
In September 2009, Gaddafi visited the US for his first appearance at the UN General Assembly.
His speech was supposed to last 15 minutes, but ended up lasting over an hour. He tore up a copy of the UN charter, accused the Security Council of being a terrorist body similar to al-Qaeda, and demanded $7.7tn in compensation to be paid to Africa by its past colonial rulers.
Inspired by uprisings in Tunisia and Egypt, Libyans began to hold protests against Gaddafi's government in the eastern city of Benghazi in February of this year.
He used military force to quell demonstrations, but the protests escalated into an all-out armed conflict, with NATO-led forces intervening.
On June 27, the actions of the Libyan government were referred to the International Criminal Court, which issued arrest warrants for Gaddafi, one of his sons and his spy chief on charges of crimes against humanity.
Gaddafi repeatedly blamed the unrest on al-Qaeda and a "colonialist plot". He called those opposed to him "rats", and alleged that they had been influenced by "hallucinogenic drugs".
In his last address before the NTC's fighters entered Tripoli, he accused "Western intelligence" of "working with al-Qaeda to destroy Libya".