Denmark–Libya relations refers to the current and historical relations between Denmark and Libya. Bilateral relations are tense because of the Jyllands-Posten Muhammad cartoons controversy and the 2011 military intervention in Libya. Denmark is represented in Libya, through its embassy in Cairo, Egypt. Danish Foreign Minister Villy Søvndal visited Libya in February 2012, for the opening of the new representative office in Tripoli.
 In January 1952, Denmark and eleven other countries sponsored a resolution to admit Libya under King Idris to the United Nations, and recognize Libya as an independent state.
 After the Libyan Arab Airlines Flight 114 incident, Denmark with France, Australia and the United Kingdom abstained from voting in the United Nations Security Council. After the 1986 Berlin discotheque bombing, Denmark ordered the Libyan diplomats in Denmark to leave the country. As a response to the expels, the Libyan government expelled a diplomat from Denmark. In January 2006, the Libyan Government closed their embassy in Denmark, as a protest against the Jyllands-Posten Muhammad cartoons controversy. In 2008, Libya boycotted Danish companies, and excluded Danish companies from big infrastructure projects worth 126.5 billion dollars.
 On 18 March, Danish Foreign Minister Lene Espersen met with National Transitional Council representative Ali Zeidan. On 25 March, Danish politician Naser Khader supported a Danish recognition of the National Transitional Council as the legitimate government of Libya. On 19 April, the Libyan Observatory for Democracy and Human Rights, a non-governmental organization and umbrella organization for the National Transitional Council opened an office in Copenhagen. Denmark was among the countries a council spokesman said on 5 May 2011 had recognized the National Transitional Council as the Libyan government. However, Danish government spokesperson Jean Ellermann Kingombe said Copenhagen hadn't taken that step but considers the council "a relevant partner for dialogue". On 22 June, Denmark recognized the National Transitional Council as the sole legitimate representative of Libya.
 On 5 March, during the 2011 Libyan civil war, the Danish Development Minister Søren Pind assisted the United Nations Commission on Human Rights with 30 million DKK to help the Libyan people who have fled to Egypt and Tunisia. On 22 March, Libyan state television launched a propaganda offensive against Denmark, accusing Denmark of having led a campaign against Muslims for several years.
 The fact that Denmark which has been conducting for years a campaign against Islam and Muslims through blasphemous caricatures of Prophet Mohammed leads the bombing reveals that this aggression is a war of the crusaders against Muslim peoples, including the Libyan people, with the aim of terrorizing Muslims and eradicating Islam.  In April, DanChurchAid sent some deminers to clear mines in Libya. In early April 2011, Denmark considered receiving about 10 Libyan refugees from Lampedusa, Italy. The Danish government considered imposing a freeze on Libyan assets in Denmark. Muammar Gaddafi had about 25 million DKK in Denmark. During the war, the Danish Foreign Ministry made a temporary travel advice for Libya on their website. Libyan consul general to Denmark, Munir Eldawadi, was expelled from Denmark and declared a persona non grata in May 2011. On 9 August 2011, Denmark gave two Libyan diplomats, loyal to Gaddafi, Saleh Omar AbuRwesha and Khaled Mansour Salem el-Asfar five days to leave Denmark, and both were declared persona non grata.
 On 13 March, by unanimous vote, Denmark's Parliament authorized direct military action by its air force to help enforce UN Security Council Resolution 1973, marking the only time so far in the state's history that military commitment was supported by full parliamentary unity. The Royal Danish Air Force is participating with six F-16AM fighters, one C-130J-30 Super Hercules military transport plane and the corresponding ground crews. Only four F-16s will be used for offensive operations, while the remaining two will act as reserves. The first airstrikes from Danish aircraft were carried out on 23 March with four aircraft making twelve sorties as part of Operation Odyssey Dawn. The Guardian reported in May 2011, that Danish F-16 fighters killed Muammar Gaddafi's son Saif al-Arab Gaddafi.
 In June, US Secretary of Defense Robert Gates praised Denmark, Canada and Norway, saying that although those two countries had only provided twelve percent of the aircraft to the operation, their aircraft had conducted one-third of the strikes.
 In 2008, Hannibal Muammar Gaddafi lost a lawsuit he brought in Denmark against Danish newspaper Ekstra Bladet. Ekstra Bladet reported that in 2005, Gaddafi, then a student in Copenhagen, had directed the abduction and beating of a Libyan national at the home of the Libyan consul in Gentofte. Gaddafi failed to appear in court to present his side of the case, and the court ruled that the existing evidence supported Ekstra Bladet's version of events.