Operation Tannenbaum
Operation Tannenbaum ("Fir Tree"), known earlier as Operation Grün ("Green"), was a planned but cancelled invasion of Switzerland by Germany and Italy during World War II.

Background
Before the outbreak of the Second World War, Adolf Hitler made repeated assurances that Germany would respect Swiss neutrality in the event of a military conflict in Europe. In February 1937, he announced to the Swiss federal Councillor Edmund Schulthess that "at all times, whatever happens, we will respect the inviolability and neutrality of Switzerland", reiterating this promise shortly before the German invasion of Poland. These were, however, purely political manoeuvres intended to guarantee Switzerland's passiveness. Nazi Germany planned to end Switzerland's independence after it had defeated its main enemies on the continent.

National Socialist attitudes towards Switzerland
In a meeting held with Fascist Italy's leader, Benito Mussolini, and foreign minister, Galeazzo Ciano, in June 1941, Hitler stated his opinion on Switzerland quite plainly:

In a later discussion, the German foreign minister Joachim von Ribbentrop directly alluded to the possibility of carving up Switzerland between the two Axis powers:

In August 1942, Hitler further described Switzerland as "a pimple on the face of Europe" and as a state that no longer had a right to exist, denouncing the Swiss people as "a misbegotten branch of our Volk." From a Nazi viewpoint, Switzerland, as a small, multilingual, decentralized democracy where German-speakers felt more of an affinity with their French-speaking fellow Swiss citizens than towards their German brothers across the border, was the antithesis of the racially homogeneous and collectivised "Führer State". Hitler also believed that the independent Swiss state had come into existence at a time of temporary weakness of the Holy Roman Empire, and now that German power had been re-established after the National Socialist takeover, the independent country of Switzerland had become obsolete.

Although Hitler despised the democratically-minded German Swiss as the "wayward branch of the German people", he still acknowledged their status as Germans. Furthermore, the openly pan-German political aims of the Nazi party called for the unification of all Germans into a Greater Germany, which included the Swiss people. The first goal of the 25-point National Socialist Program stated that "We [the National Socialist Party] demand the unification of all Germans in the Greater Germany on the basis of the people's right to self-determination."

In their maps of Greater Germany, German textbooks included the Netherlands, Belgium, Austria, Bohemia-Moravia, the German-speaking parts of Switzerland, and western Poland from Danzig (Gdańsk in Polish) to Krakau (Kraków). Ignoring Switzerland's status as a sovereign state, these maps frequently showed its territory as a German Gau. The author of one of these textbooks, Ewald Banse, explained, "Quite naturally we count you Swiss as offshoots of the German nation, along with the Dutch, the Flemings, the Lorrainers, the Alsatians, the Austrians and the Bohemians ... One day we will group ourselves around a single banner, and whosoever shall wish to separate us, we will exterminate!" Various Nazis were vocal about the German intent to "expand Germany's boundaries to the farthest limits of the old Holy Roman Empire, and even beyond."

Though not himself politically aligned with the Nazis even if his ideas offered them ideological support, geopolitician Karl Haushofer had also advocated for the partition of Switzerland between its surrounding countries in his work, such that Romandy (Welschland) would be awarded to Vichy France, Ticino to Italy, and Northern, Central and Eastern Switzerland to Germany.

Military preparations
The Swiss government approved an increase in defence spending, with a first installment of 15 million Swiss francs (out of a total multi-year budget of 100 million francs) to go towards modernisation of the armed forces. With Hitler's renunciation of the Treaty of Versailles in 1935, this spending jumped to 90 million francs. The K31 became the standard-issue infantry rifle in 1933, and was superior to the German Kar98 in ease of use, accuracy, and weight. By the end of World War II, nearly 350,000 would be produced. 

Switzerland has a unique form of generalship. In peacetime, there is no officer with a rank higher than that of Korpskommandant (3-star-general). However, in times of war and in 'need', the Bundesversammlung elects a General to command the army and air force. On 30 August 1939, Henri Guisan was elected General, with 204 votes out of 227 cast. He immediately began preparations for war.

When, two days after his election, the Wehrmacht invaded Poland and World War II began, Guisan called for a general mobilisation and issued Operationsbefehl Nr. 1, the first of what was to become a series of evolving defensive plans. This first plan assigned the existing three army corps to the east, north, and west of Switzerland, with reserves in the center and south of the country. Guisan reported to the Federal Council on September 7 that by the time Britain declared war on Germany, "our entire army had been in its operational positions for ten minutes." He also had his Chief of the General Staff increase the upper service eligibility age from 48 to 60 years (men of these ages would form the rear-echelon Landsturm units), and ordered the formation of an entirely new army corps of 100,000 men.

Germany started planning the invasion of Switzerland on 25 June 1940, the day that France surrendered. At this point, the German army in France consisted of three groups with two million soldiers in 102 divisions. Recognizing that Switzerland and Liechtenstein were surrounded by Occupied France and the Axis Powers, Guisan issued Operationsbefehl Nr. 10, a complete overhaul of existing Swiss defensive plans. In this plan, the Fortress Saint-Maurice, the Gotthard Pass in the south, and the Fortress Sargans in the northeast would serve as the defence line. The Alps would be their fortress. The Swiss 2nd, 3rd, and 4th Army Corps were to stage delaying actions at the border, while all who were able were to retreat to the Alpine refuge known as the Réduit national. The population centers were, however, all located in the flat plains in the north of the country. They would have to be abandoned to the German forces in order for the rest of the country to survive.

After the armistice with France, Hitler demanded to see plans for the invasion of Switzerland. Franz Halder, the head of Oberkommando des Heeres (OKH), recalled: "I was constantly hearing of outbursts of Hitler's fury against Switzerland, which, given his mentality, might have led at any minute to military activities for the army." Captain Otto-Wilhelm Kurt von Menges in OKH submitted a draft plan for the invasion. Generaloberst Wilhelm Ritter von Leeb's [[Army Group C|Heeresgruppe 'C''']] (HGr. C), led by Generalleutnant Wilhelm List and the 12th Army would conduct the attack. Leeb himself personally reconnoitered the terrain, studying the most promising invasion routes and paths of least resistance. Menges noted in his plan that Swiss resistance was unlikely and that a nonviolent Anschluss was the most likely result. With "the current political situation in Switzerland," he wrote, "it might accede to ultimatum demands in a peaceful manner, so that after a warlike border crossing a rapid transition to a peaceful invasion must be assured."

The German plan continued to undergo revision until October, when the 12th Army submitted its fourth draft, now called Operation Tannenbaum. The original plan had called for 21 German divisions, but that figure was downsized to 11 by the OKH. Halder himself had studied the border areas, and concluded that the "Jura frontier offers no favorable base for an attack. Switzerland rises, in successive waves of forest-covered terrain across the axis of an attack. The crossing points on the river Doubs and the border are few; the Swiss frontier position is strong." He decided on an infantry feint in the Jura in order to draw out the Swiss Army and then cut it off in the rear, as had been done in France. With the 11 German divisions and roughly 15 more Italian divisions prepared to enter from the south, the Axis plans were to invade Switzerland with somewhere between 300,000 and 500,000 men.

For reasons that are still uncertain, Hitler never ordered the invasion.  One theory is that a neutral Switzerland would have been useful to hide Axis gold and to serve as a refuge for war criminals in case of defeat. This may also explain Germany's continued recognition of Sweden's neutrality.  One simpler explanation is that there would have been little strategic gain in conquering Switzerland, while a drawn-out and costly mountain war might well have ensued.  Although the Wehrmacht feigned moves against Switzerland in its offensives, it never attempted to invade. After D-Day, Operation Tannenbaum was put on hold.

German plans for Nazi rule in Switzerland
Germany's political objective in the expected conquest of Switzerland was to regain the bulk of the "racially suitable" Swiss population for the German people, and aimed at direct annexation into the German Reich of at least its ethnic German parts.

With this purpose in mind, Heinrich Himmler in September 1941 discussed with his subordinate, Gottlob Berger, the suitability of various people for the position of Reichskommissar for the 'reunion' of Switzerland with Germany.Jürg Fink, Die Schweiz aus der Sicht des Dritten Reiches, 1933–1945 (Zurich: Schulthess, 1985), 71–72. This yet-to-be-chosen official would have had the task of facilitating the total amalgamation (Zusammenwachsen) of the Swiss and German populations. Himmler further attempted to expand the SS into Switzerland, with the formation of the Germanische SS Schweiz in 1942.

A document named Aktion S, found in the Himmler files, detailed at length the planned process for the establishment of Nazi rule in Switzerland from its initial conquest by the Wehrmacht up to its complete consolidation as a German province. It is not known whether this plan was endorsed by any high-level members of the German government.

After the Second Armistice at Compiègne in June 1940, the Reich Interior Ministry produced a memorandum on the annexation of a strip of eastern France from the mouth of the Somme river to Lake Geneva, intended as a reserve for post-war German colonisation. The planned dissection of Switzerland would have accorded with this new French-German border, annexing the French-speaking region of Romandy into the Reich despite the linguistic difference.

Italian involvement
Germany's wartime ally Italy, under the rule of Benito Mussolini, desired the Italian-speaking areas of Switzerland as part of its irredentist claims in Europe, particularly the Swiss canton of Ticino. In a tour of the Italian alpine regions, he announced to his entourage that "the New Europe ... could not have more than four or five large states; the small ones [would] have no further raison d'être and [would] have to disappear".

Switzerland's future in an Axis-dominated Europe was further discussed in a 1940 round-table conference between Italian foreign minister Galeazzo Ciano and German foreign minister Joachim von Ribbentrop, also attended by Hitler. Ciano proposed that in the event of Switzerland's dissolution, it should be divided along the central chain of the Western Alps, since Italy desired the areas to the south of this demarcation line as part of its own war aims. This would have left Italy in control of Ticino, Valais, and Graubünden.