After WW2 (1945) the Allies occupied Germany till 1949, when both the Federal Republic (West Germany) and the Democratic Republic (East Germany) were set up as a result of the breakdown of cooperation between the NATO powers and the Soviet Union (Stalin). The Allied occupiers oversaw the running of Germany (in four major sectors: British, French, Russian, US), and the de-nazification programs, and war crimes trials. Allied troops remained in West Germany until 1955, their numbers being reduced over time, and after that mainly US troops remained in US (a.k.a. NATO) bases (till today).
The US (Allied) occupation of Japan after WW2 lasted from 1945 to 1952. The U.S. governance of occupied Japan transformed the entire form of government (to a parliamentary democracy), and in conjunction with other Allies (British, Indian, French, Australian, Nationalist Chinese, Philippine) war crimes tribunals (of Japanese militarists) were held in Manila. The U.S. kept bases in Japan (to this day), and as the Korean War had started in 1950, the U.S. pumped huge amounts of money into Japan as its platform from which to launch attacks on the Korean peninsula, which US spending kick-started the rapid growth of the Japanese economy.
Germany (West, until 1990 when it reunified with East) and Japan were thus tied economically and militarily to the US-led world capitalist system (the “First World”). There was never a post 1945 Nazi insurgency, nor a post 1945 Imperialist Japanese insurgency, nor a spawning of such international “terrorist” groups.
The NATO (“Allied”) occupation of Libya lasted only 11 days, occurring between Gaddafi’s death on 20 October 2011, and 31 October 2011. During the Libyan Civil War, the Gaddafi regime relied mainly on mercenary troops (largely Sahelian Africans, but also Western mercenaries and technicians), and Gaddafi was bent on mass murder of the pro-democracy Arab Spring inspired activists who opposed his regime, which opposition was favored by most of the Libyan population. [This paragraph has been revised, as prompted by Robert Pearsall in a comment, below.]
The new Libyan government had asked the NATO-UN forces to stay till the end of 2011 (two months), to help it stabilize the country. But, the NATO powers did not wish to invest the time, money and troops/people-power (with the possibilities of some casualties) for that purpose. The broken Libya of today, with mass trafficking of African refugees (by today’s “Barbary Pirates”) towards Mediterranean Europe; and Islamist militia-terrorist bases and training camps, is the result.
What the NATO powers did regarding Libya is equivalent to an unwise patient with an infection who stops taking his full course of prescribed antibiotics after three days, when he’s feeling “good,” instead of the full week or two, and the infection is not eradicated but comes back and is worse because it has mutated to become resistant to the original antibiotics it was suppressed with.
The idea of R2P, “responsibility to protect,” is correct; those with the power (military might) to prevent a dictator from enacting a mass atrocity crime should do so as an act of solidarity with all of humanity, otherwise they share in the guilt of the atrocity as a sin of omission. But, in committing to such action one should do it right, completely, not on the cheap. The goal is not simply the downfall of a dictator and mass murderer, but the transformation of and unity with a whole population. Selfishness is not a good long-term defense. As “Kambei Shimada” said in Kurosawa’s “Seven Samurai”: “This is the nature of war: by protecting others, you save yourself.”