A unique archive of photographs from Libya, spanning the reign of King Idris al-Sanusi and the North African country’s late leader Muammar Gaddafi, is going on show this week as part of the London Festival of Photography. This shot shows the young army officer turned coup leader relaxing with friends in the desert several years after he ousted the king.

King Idris led Libya from independence in 1951. This formal portrait has a handwritten note dated 11 March 1965 to fellow Moroccan monarch, King Hassan II, which reads: “For the memory of brotherhood.” Four years later he was ousted by Gaddafi and ended his days in exile in Egypt.

During World War II, the king sided with the British against the Italian colonisers of Libya. This shot, taken shortly after independence, shows Queen Elizabeth II visiting Tobruk - where the British had an airbase that Gaddafi closed in 1970. The new leader wanted to right what he felt were the wrongs of foreign domination.

This included nationalising the oil industry and renegotiating contracts with oil firms - threatening to shut off production if they refused his terms. He was a huge admirer of Egypt's independence leader, President Gamal Abdul Nasser, seen here at a stadium in Benghazi in December 1969.

During his 42-year rule, Gaddafi had a quixotic and often paradoxical foreign policy. At first he followed a pan-Arab agenda. Here crowds mob Gaddafi and his Sudanese and Egyptian counterparts in Tripoli in 1969.

Gaddafi attempted to merge with several Arab countries, including Egypt, Syria and Tunisia - but none of these ever took off. In the 1990s he turned his attention to sub-Saharan African, where he found his country's wealth could often buy more influence.

Gaddafi became notorious in the West for backing groups such as the Irish Republican Army. He also had fairly close ties with the Palestine Liberation Organisation, then led by Yasser Arafat - seen here on a visit to Libya.

But he tended to blow hot and cold in his relations with most leaders – Gaddafi is seen here holding hands with Soviet Union ruler Leonid Brezhnev in 1981.

In 1977, the Libyan leader declared a "people's revolution", setting up "revolutionary committees" which heralded a more repressive period. This photo shows a public hanging in that year in Benghazi, the city where the revolution began in February 2011 and ended in Gaddafi's death in October that year.