In George Orwell’s novel 1984, the country of Oceania has been in a war against Eurasia for years.
Oceania suddenly switches sides, naming Eastasia as its enemy and making its mortal enemy, Eurasia, its new ally.
The leaders use propaganda to convince people that, “We’ve always been at war with Eastasia”. The dumbed-down public doesn’t even notice that they’ve switches sides, and blindly rallies around Eurasia as its perennial friend and ally.
The same thing is happening in real life.