The revolutionary leader Colonel Muammar Abu-Minyar al-Gaddafi was born into a peasant family in Libya in 1942. The family were Bedouins and lived a nomadic lifestyle.
There was much controversy surrounding Colonel Gadaffi. His followers compared him to the prophet Mohammed, and claimed that he was a messenger and thinker in the tradition of the North African holy man, or "marabout."
However, the west was for a long time deeply sceptical of this viewpoint, often stating that Gadaffi posed a threat to world peace by sponsoring terrorism.
Colonel Gadaffi was the leader of the Great Socialist People's Libyan Arab Jamahiriya. In theory, this organisation was a "state of the masses," governed by the people through a system of local councils. In practice, though, it was a military dictatorship controlled by Gadaffi.
He had no official title, although he was effectively head of state and had been since 1969.
His "Green Book" was "an attempt to explain the dialectic which exists between Marxism and Capitalism," and in it Gadaffi proposed his Third Universal Theory - claiming that there was a third way, beyond communism and capitalism, through which social harmony could be achieved. His ideas were allegedly based around democracy, equality, and communion with nature.
However, Colonel Gadaffi was infamous for his support of terrorist organisations including the IRA in Ireland, and the Spanish Basque separatist movement ETA.
He had also shown support - both moral and financial - for Robert Mugabe in Zimbabwe, who has been exposed as a tyrant.
For many years, he harboured the two terrorists responsible for the bombing of Pan Am flight 103 over Lockerbie in Scotland, and refused to accept responsibility or pay compensation.
For most of the 1990s, Libya endured economic sanctions and diplomatic isolation as a result of Gaddafi's refusal to allow the extradition of the two.
In August 2003, two years after Abdelbaset Ali Mohmed Al Megrahi's conviction in a Scottish court - based in The Netherlands - Libya wrote to the United Nations formally accepting 'responsibility for the actions of its officials' in respect of the Lockerbie bombing and agreed to pay compensation of up to $2.7 billion to the families of the 270 victims. The same month, Britain and Bulgaria co-sponsored a U.N. resolution which removed the suspended sanctions.
Gaddafi had also emerged as a popular African leader. As one of the continent's longest-serving, post-colonial heads of state, the Libyan leader enjoyed a reputation among many Africans as an experienced and wise statesman who had been at the forefront of many struggles over the years.
He also sought to continue his rehabilitation in the west. Following the overthrow of Saddam Hussein in 2003, Gaddafi announced that his nation had an active weapons of mass destruction programme, but that he was willing to allow international inspectors into his country to observe and dismantle them.
As a result, the United States announced that it would restore full diplomatic relations with Libya once Gadaffi declared he was abandoning Libya's weapons of mass destruction programme.
In March 2004, British Prime Minister Tony Blair became one of the first western leaders in decades to visit Libya and publicly meet Gaddafi. The visit paved the way for greater cooperation between Libya and the UK as the countries pursued trade deals, and also helped to legitimise Gaddafi's rehabilitation in the west.
The tour was followed by that of French president Nicolas Sarkozy in July 2007, who went to Libya and signed a number of bilateral and multilateral EU agreements. The changing tide also allowed Gaddafi to host US Secretary of State Condoleezza Rice in September 2008.
Next came a historic cooperation treaty between Libya and Italy, which was signed in Benghazi by Gaddafi and Italian Prime Minister Silvio Berlusconi.
Although he appeared to be making the right progress as far as international issues were concerned, his track record at home remained questionable. Gaddafi was accused of allegedly running Libya by suppressing political opponents, holding people without reason or trial, and using torture. It is also believed in the West that Gadaffi was responsible for the trafficking of slaves.
Despite his apparent strong repression of opposition, Gaddafi's position was threatened by a wave of revolutions in North Africa and parts of the Middle East. He came under mounting pressure amid unprecedented protests in the Libyan capital and other regional cities, as well as defections by senior diplomats and some army officials.
Protests against the flamboyant leader, famous for having an all female bodyguard contingent known as the Amazonian Guard, spread across Libya with a determined populace, apparently keen to depose the long serving ruler.
Unwilling to be forced out like Egypt's Hosni Mubarak and Tunisia's Zine El Abidine Ben Ali, he allegedly ordered a violent crackdown on protesters, but the death and bloodshed appeared to galvanise them.
In February 2011, political protests began in Libya, with life quickly descending into chaos. The Gadaffi regime lost control of the east of the country. The dictator responded by using military force and foreign mercenaries to kill rebels.
By March 2011 the UN had declared a no fly zone over the country, with NATO forces also becoming involved in a bid to protect civilians from Gadaffi's forces.
In June 2011, the International Criminal Court issued a warrant for his arrest for crimes against humanity.
In August 2011, the fighting in Libya intensified, with the rebel forces gaining control of the capital Tripoli. The dictator's compound was taken over and one of his sons detained by rebels. News footage showed rebels entering the city's main square and tearing down the leader's pictures.
Gadaffi's whereabouts were unknown and no pictures of the dictator were made public since the city was lost to the rebels. However, in a voice recording, Gadaffi vowed to continue fighting.
In September 2011, an underground chamber was discovered under Tripoli's largest Al Fatah University, where several students were hanged in public during the 1980s. The secret room contained a Jacuzzi and a bedroom. Only Gadaffi and his top associates had access to the place.
On 20 October 2011, news reports stated that the Libyan leader had been captured by rebel forces near his hometown Sirta. He had been travelling in a convoy of vehicles targeted by a French air strike, which killed dozens of loyalist fighters and injured Gadaffi.
He hid in a tunnel with several of his bodyguards but was soon discovered by members of the National Transitional Office, which had effectively taken over the governing of Libya.
Gadaffi was shot shortly after being captured and several news channels showed a video of his death.
UK deputy prime minister Nick Clegg commented on Gadaffi's death saying: "The UK could not stand idly by while Gaddafi massacred innocent citizens in Benghazi as he was threatening to do."
He added that his death was a "huge signal" to other dictators that their actions will catch up with them, quotes BBC News.