FOR four decades the wilful, mercurial figure of Colonel Muammar Gaddafi ruled Libya with an iron grip while remaining a persistent thorn in the side of the West.

Branded “mad dog” by Ronald Reagan, the outlandish antics, flamboyant dress and bombastic pronouncements of the selfstyled “Brother Leader” made him a figure of ridicule at times.

During his travels abroad he was accompanied by a blonde Ukrainian nurse and insisted on staying in his Bedouin tent, protected by his team of glamorous, gun-toting female bodyguards.

When he was interviewed by the BBC’s John Simpson, he noisily broke wind throughout their encounter.

But he has also been associated with some of the most notorious terrorist atrocities of the pre- 9/11 era.

He shipped arms to the IRA during the Troubles in Northern Ireland and his regime has accepted responsibility for the Lockerbie bombing.

At home in Libya, he ruthlessly crushed dissent against his autocratic rule while his agents hunted down and killed opponents abroad.

When his people – inspired by the Arab Spring – finally rose up against him earlier this year, he responded with a characteristic mixture of bluster and brutality calling for the “devils” to be cleansed.

But for all the outrage over his flouting of international norms, he was also seen by diplomats as a wily political operator, proving to be one of the great survivors in a turbulent region.

Through assassination attempts, sanctions and US airstrikes, he doggedly clung to power.

Born in the desert in 1942, at 27 years old Col Gaddafi became the leader of a small group of junior army officers who in September 1969 staged a bloodless coup, overthrowing King Idris while he was abroad receiving medical treatment.

Fiercely anti-western and inspired by Egypt’s President Nasser, he governed according to his unique political philosophy – set out in his Green Book – based on a combination of socialism and Arab nationalism.

He quickly showed he would brook no dissent to his idiosyncratic rule, reportedly having students who marched against his regime publicly hanged.

In one of his most infamous atrocities, 1,200 prisoners were massacred in Tripoli’s Abu Salim jail in 1996.

His outspoken public support for a range of terrorist organisations, including the IRA and the Palestine Liberation Organisation, attracted growing international criticism and concern.

The increasingly erratic nature of his regime was underlined in 1984 when diplomats at the Libyan embassy in London opened fire on a demonstration outside, killing PC Yvonne Fletcher.

In 1986, the bombing by Libyan agents of a Berlin nightclub, in which two off-duty US servicemen died, prompted President Reagan to launch airstrikes on Tripoli and Benghazi. Col Gaddafi’s adopted daughter was among 35 Libyans killed in the raid.

Two years later, on December 21 1988, came the most notorious incident of all – the bombing of Pan Am Flight 103 over the Scottish village of Lockerbie, killing 270 people.

The attack prompted worldwide outrage. For years, Col Gaddafi denied any involvement, leading to sanctions by the United Nations and international pariah status for his regime.