Image caption Attacks carried out with Libyan Semtex included the Enniskillen bomb in 1987

As Libyans fight against a 42-year dictatorship, deputy first Minister Martin McGuinness has said he feels no shame about republicans' past links with Colonel Gaddafi.

Speaking to the BBC's Political Editor Mark Devenport about the situation in Libya, Mr McGuinness said he condemned the regime's attacks on unarmed protestors.

He said he supported those rising up against monarchies and fiefdoms in the Middle East.

So what exactly is the link between Colonel Gaddafi and Northern Ireland?

In the 1960s the Provisional IRA was badly armed, relying on old weapons, some dating back to World War II.

Muammar Gaddafi, who took over Libya in a 1969 coup, saw the IRA as a comrade-in-arms fighting British imperialism and he was partly responsible for providing it with more modern weaponry.

The first proven connection with Libya was discovered in 1973 when the Irish Navy boarded a ship called the Claudia, off the Irish coast.

They found five tonnes of weaponry supplied by Libya.

Links between Gaddafi and the IRA re-emerged in 1986 after Gaddafi's adopted daughter was killed along with more than 100 other people by US bombing raids launched from UK bases.

The Libyan leader has said he resumed contact with the IRA in the aftermath of those air raids.

A year later, French authorities stopped a ship, the Eksund, which was on its way to Northern Ireland carrying around 1,000 AK-47 machine guns, more than 50 ground-to-air missiles and two tonnes of Semtex.

It is believed that other shipments of arms reached Ireland before the Eskund was apprehended.

In 2003, the BBC's Mark Devenport spoke to an intelligence source who said there was no question that Libyan arms had greatly enhanced the IRA's deadliness.

'Essential partner'

Attacks carried out with Libyan Semtex included the Enniskillen bomb in 1987, the Ballygawley bus bombing in 1988 and about 250 other booby-trap bombings.

Gaddafi's involvement in the 1988 bombing of Pan Am flight 103 over Lockerbie finally led to his being ostracised and sanctions being imposed by the United Nations.

In 2003, spooked by the US response to the 11 September attacks and the invasion of Iraq, and encouraged by Prime Minister Tony Blair, Gaddafi sought rapprochement by admitting responsibility for Lockerbie and abandoning his quest to develop weapons of mass destruction.

Image caption Encouraged by Prime Minister Tony Blair, Gaddafi sought rapprochement with the west

The families of the 180 US victims of the Lockerbie bombing received $1.3bn (£1bn) in total as part of a deal between the US and Libya.

The UN Security Council voted to completely lift sanctions in 2003, but the DUP's Ian Paisley Jr argued against this because of the lack of compensation for IRA victims.

As part of the negotiations to lift sanctions, Libyan officials provided information about millions of pounds and 120 tonnes of weaponry which they had given the IRA.

However, the UK government has never secured a compensation deal from Libya for victims of IRA attacks.

During a meeting with Gaddafi in 2009, then Prime Minister Gordon Brown declined to put any formal pressure on Libya for compensation.

Mr Brown told a victims' lawyer at the time that it was not "appropriate" to discuss the claims.

In a letter to lawyer Jason McCue in September 2008, Mr Brown told him that Libya was now an "essential partner" in the fight against terrorism and it was in the UK's interest for that co-operation to continue.

Mr McCue has been lobbying the UK to raise the matter of compensation at the highest levels of the Libyan government.

'Genocide'

More than 100 UK IRA victims have been excluded from out-of-court deals agreed by Libya with three American victims of IRA atrocities.

An Assembly motion in 2009 which called for compensation from Libya for IRA victims was backed by all parties, except Sinn Fein.

Sinn Fein President Gerry Adams said at the time that he supported the right to seek compensation, but said the motion was "unfair and partisan".

In September 2009, the BBC learned that PSNI officers were sent to Libya to help train its police.

Police said a chief inspector/temporary superintendent had spent a number of days in Libya in November 2008 to assess training needs.

Mid-East unrest: Libya Col Muammar Gaddafi has ruled since 1969

Population 6.5m; land area 1.77m sq km

Population with median age of 24.2, and a literacy rate of 88%

Gross national income per head: $12,020 (World Bank 2009) Country profile: Libya Unrest country by country Gaddafi's son warns of civil war

Based on his recommendations, an inspector was part of a tactical command course between 12 January and 2 February 2009.

The decision was met with shock and criticism by unionist politicians. Many RUC officers killed or injured during the Troubles were victims of Libyan weapons.

Now, after 42 years, Gaddafi's regime appears to be teetering on the brink.

Libya's diplomats at the United Nations in New York called for international intervention to stop the government's violent action against street demonstrations in their homeland.

Deputy Permanent Representative Ibrahim Dabbashi said Libyans had to be protected from "genocide", and urged the UN to impose a no-fly zone.

Perhaps now the best that victims can hope for is that the Libyan people finally oust the man who supported the IRA's campaign of violence for so long.