The Government of the Kingdom of Yugoslavia in Exile () was an official government-in-exile of Yugoslavia, headed by King Peter II. It evacuated from Belgrade in April 1941, after the Axis invasion of the country, and went first to Greece, then to Palestine, then to Egypt, and finally, in June 1941, to the United Kingdom. Hence, it is also referred to as the "Government in London" (). It was dissolved in March 1945.

Background According to economics professor and historian Jozo Tomasevich, the Kingdom of Yugoslavia was politically weak from the moment of its creation in December 1918, and remained so during the interwar period mainly due to rigid centralism combined with strong ethno-religious identities. In particular, the religious primacy of the Serbian Orthodox Church in national affairs and discrimination against Roman Catholics and Muslims compounded the dissatisfaction of the non-Serb population. The kingdom's internal politics became ethnically polarised, a phenomenon that has been referred to as the "national question" in Yugoslavia.

Until 1929, this state of affairs was maintained by subverting the democratic system of government. In 1929, democracy was abandoned and a royal dictatorship was established by King Alexander. The king attempted to weaken the ethnic divisions in the country by creating administrative divisions () based on rivers rather than traditional regions. By 1933, however, discontent in the largely Croat-populated Sava Banovina had developed into full-blown civil disorder, which the regime countered with a series of assassinations and arrests of key Croatian opposition figures. When Alexander was assassinated in Marseille in 1934 by the Croatian nationalists, his cousin Prince Paul took over the regency, ruling on behalf of Alexander's 11-year-old son, Peter II. In the aftermath of Alexander's assassination, Yugoslavia was isolated both militarily and diplomatically.

Prince Paul repeatedly attempted to negotiate a political settlement with Vladko Maček, the Croatian Peasant Party (HSS) leader. In January 1937, Prime Minister Milan Stojadinović met with Maček at Prince Paul's request, but Stojadinović was unable to contain Croat dissatisfaction with a Yugoslavia dominated by the Serbs. In 1938, the German annexation of Austria gave Yugoslavia a common border with Nazi-ruled Germany. That year, the commander of the Royal Yugoslav Air Force, Lieutenant General Dušan Simović, was involved in three coup plots—two early in the year driven by Serb opposition to the concordat with the Vatican and a later one sparked by dissatisfaction with results of the December elections.

On the evening of 3 February 1939, five ministers resigned from the government in response to a Serb nationalist speech made by the Minister of Education, Bogoljub Kujundžić. The five were: the Slovene senate leader, Anton Korošec; the leader of the Yugoslav Muslim Organization (JMO), Mehmed Spaho; another JMO politician, Džafer Kulenović; the Slovene Franc Snoj; and the Serb Dragiša Cvetković. Prince Paul then dismissed Stojadinović and appointed Cvetković in his place, with a direction that he reach an agreement with the Croat leader Maček. While these negotiations were ongoing, Italy invaded Albania. In August 1939, the Cvetković–Maček Agreement was concluded to create the Banovina of Croatia, which was to be a relatively autonomous political unit within Yugoslavia. Separatist Croats considered the Agreement did not go far enough, while many Serbs believed it went too far. The Cvetković-led cabinet formed in the wake of the agreement was resolutely anti-Axis, and included five members of the HSS, with Maček as deputy Prime Minister.

Lead-up to invasion By the time of the German invasion of Poland and subsequent outbreak of World War II in September 1939, the Yugoslav Intelligence Service was cooperating with British intelligence agencies on a large scale across the country. This cooperation, which had existed to a lesser extent during the early 1930s, intensified after the Anschluss in 1938. These combined intelligence operations were aimed at strengthening Yugoslavia and keeping her neutral while encouraging covert activities. From the outbreak of war British diplomacy focused on keeping Yugoslavia neutral, which the Ambassador Ronald Campbell apparently still believed possible. In mid-1940, German pressure on the government resulted in the resignation of the Minister of the Interior, Dr. Stanoje Mihaldžić, who had been organising covert anti-Axis activities. In mid to late 1940, British intelligence became aware of coup plotting, but managed to side-track the plans, preferring to continue working through Prince Paul. The Special Operations Executive (SOE) office in Belgrade went to significant lengths to support the opposition to the anti-Axis Cvetković government, which undermined the hard-won balance in Yugoslav politics that government represented. SOE Belgrade was entangled with pro-Serb policies and interests, and disregarded or underestimated warnings from SOE Zagreb and British diplomats in that city, who better understood the situation in Yugoslavia as a whole. In October 1940, Simović was again approached by plotters planning a coup but he was non-committal.

Yugoslavia's situation worsened in October 1940 when Italy invaded Greece from Albania, and the initial failure of the Italians to make headway only increased Yugoslav apprehension that Germany would be forced to attack Greece in order to help Italy. In September and November 1940 respectively, Germany forced Hungary and Romania to accede to the Tripartite Pact. In early November 1940, Nedić, who believed that Germany would win the war, proposed to the government that it abandon its neutral stance and join the Axis as soon as possible in the hope that Germany would protect Yugoslavia against its "greedy neighbors". A few days later Prince Paul, having realised the impossibility of following Nedić's advice, replaced him. Germany's planned invasion of Greece would be simplified if Yugoslavia could be neutralised. Over the next few months, Prince Paul and his ministers laboured under overwhelming German diplomatic pressure, the threat of an attack by the Germans from Bulgarian territory, and the unwillingness of the British to promise practical military support. By late 1940, British policy towards the government of Yugoslavia had shifted from acceptance of Yugoslav neutrality to pressuring the country for support in the war against Germany.

In January 1941, the US placed additional pressure on Prince Paul, urging non-cooperation with Germany. On 14 February, Adolf Hitler met with Cvetković and Yugoslav foreign minister Aleksandar Cincar-Marković, and requested Yugoslavia's accession to the Tripartite Pact. He also pushed for the demobilisation of the Royal Yugoslav Army, and the granting of permission to transport German supplies through Yugoslavia's territory, along with greater economic cooperation. In exchange he offered a port near the Aegean Sea and territorial security. On 1 March, Yugoslavia was further isolated when Bulgaria signed the Pact and the German army arrived at the Bulgarian-Yugoslav border.

On 4 March, Prince Paul secretly met with Hitler in Berchtesgaden and was again pressured to sign the Pact. Hitler did not request troop passage through Yugoslavia and offered the Greek city of Salonika. A time limit for Prince Paul, who was uncommitted and "wavering", wasn't set. Prince Paul, in the middle of a cabinet crisis, offered a nonaggression pact and a declaration of friendship, but Hitler insisted on accession to the Pact. Prince Paul warned that "I fear that if I follow your advice and sign the Tripartite Pact I shall no longer be here in six months."

Yugoslavia signs the Pact

On 17 March, Prince Paul returned to Berchtesgaden and was told by Hitler that it was his last chance for Yugoslavia to join the Pact, renouncing this time the request for the use of Yugoslav railways in order to facilitate their accession. On 19 March, Prince Paul convened a Crown Council to discuss the terms of the Pact and whether Yugoslavia should sign it. The Council's members were willing to agree, but only under the condition that Germany let its concessions be made public. Germany agreed and the Council approved the terms. Three cabinet ministers resigned on 20 March in protest of the impending signing of the Pact. The Germans reacted by imposing an ultimatum to accept by midnight 23 March or forfeit any further chances. Prince Paul and Cvetković obliged and accepted, despite believing German promises were "worthless". On 23 March, Germany's guarantee of Yugoslavia's territorial security and its promise not to use its railroads were publicised. In the United Kingdom, Alexander Cadogan, the Permanent Under-Secretary of State for Foreign Affairs, penned in his diary that the "Yugoslavs seem to have sold their souls to the Devil. All these Balkan peoples are trash."

On 25 March, the pact was signed at the Belvedere palace in Vienna. German radio later announced that "the Axis Powers would not demand the right of passage of troops or war materials," while the official document mentioned only troops and omitted mention of war materials. Likewise the pledge to give Salonika to Yugoslavia does not appear on the document. On the following day, Serb demonstrators gathered on the streets of Belgrade shouting "Better the grave than a slave, better a war than the pact" ().

Coup d'état

A coup d'état occurred on 27 March 1941 in Belgrade. The coup was planned and conducted by a group of pro-Western Serb-nationalist Royal Yugoslav Air Force and Royal Guard officers formally led by Simović. For practical purposes several others performed leadership roles in the conduct of the coup. Some other civilian leaders were probably aware of the coup before it was launched and moved to support it once it occurred, but they were not among the organisers. The Communist Party of Yugoslavia played no part in the coup, although it made a significant contribution to the mass street protests in many cities that signalled popular support for the coup after it occurred. The coup was successful and overthrew the three-member regency as well as the government of Cvetković. The coup had been planned for several months, but the signing of the Tripartite Pact spurred the organisers to carry it out, encouraged by the SOE. The military conspirators brought to power 17-year-old Peter Karađorđević (regnal name Peter II) to reign as the new king, whom they declared to be of age, and a government of national unity was formed with Simović as prime minister and Maček and Slobodan Jovanović as his vice-premiers.

Post-coup government In the wake of the coup, Simović's new government refused to ratify Yugoslavia's signing of the Tripartite Pact, but did not openly rule it out. Hitler, angered by the coup and anti-German incidents in Belgrade, gathered his senior officers and ordered that Yugoslavia be crushed without delay. On the same day as the coup he issued Führer Directive 25 which called for Yugoslavia to be treated as a hostile state. Italy was to be included in the operations and the directive made specific mention that "[e]fforts will be made to induce Hungary and Bulgaria to take part in operations by offering them the prospect of regaining Bačka and Macedonia". Furthermore, the directive stated that "[i]nternal tensions in Yugoslavia will be encouraged by giving political assurances to the Croats".