There’s a concept in International Relations called “diversionary war“: a war governments deliberately start in order to distract their populations of troubles at home by giving them an external foe. The canonical example is probably the decision in 1982 by the Argentine military junta to start a war with the United Kingdom over the Falkland Islands (Malvinas), which they subsequently lost pretty handily. Indeed, recent scholarship suggests that most governments which start diversionary wars go on to lose them, which points to the tragic irony of diversionary wars: the same domestic unrest that prompts governments to start them also usually makes those governments ineffective at waging them.
This U.S. diplomatic cable from 1976 relating a private meeting between Tanzanian President Julius Nyerere and the U.S. Ambassador to Tanzania offers further evidence that policymakers do indeed pursue diversionary foreign policies at times. Commenting on growing military tensions between Jomo Kenyatta’s Kenya and Idi Amin’s Uganda, Nyerere says:
NYERERE TOOK A CERTAIN WRY AMUSEMENT FROM FACT THAT UK, ISRAEL, AND KENYA ARE NOW AMIN’S CHIEF ENEMIES. HE COULD UNDERSTAND KENYA’S MAKING A BIG THING OF THE UGANDAN THREAT. “JOMO NEEDS A LITTLE EXTERNAL TROUBLE TO REINFORCE INTERNAL UNITY RIGHT NOW AND AN EXTERNAL FOOL ALWAYS HELPS IN SUCH A CASE.” (NYERERE ADDED: “WE ALL DO IT SOMETIMES.”)
Despite calling for peaceful restraint in this cable, it would ultimately be Nyerere’s Tanzania, not Kenya, which would go to war with Uganda two years later, ultimately leading to the ouster of the increasingly brutal and erratic dictator.
(See also the cameo by Donald Rumsfeld in this 1976 cable.)