Writing on resistance to the Vietnam War near the end of 1967, Noam Chomsky commented briefly on the “significant domestic repercussions” that were likely to follow the end of American occupation. “It is axiomatic that no army ever loses a war,” Chomsky observed; “its brave soldiers and all-knowing generals are stabbed in the back by treacherous civilians. American withdrawal is likely, then, to bring to the surface the worst features of American culture, and perhaps to lead to a serious internal repression.” Chomsky’s prognosis has relevance today as we confront the causes and meaning of the Donald Trump-for-president phenomenon. Trump’s popularity is commonly understood with reference to domestic factors: nativist opposition to immigration, populist hostility to so-called free trade, ideological rot within the conservative movement (expressed as overt racism and xenophobia). But the candidate himself tells a slightly different story, and close attention to his rhetoric and positions suggests that Trump’s appeal has a significant foreign policy component. Specifically, he has found a way to resolve the problem posed by the Iraq War to U.S. ideology.

In a victory speech on Tuesday, Trump summarized the story of his campaign so far. “We came down the escalator,” he began, referring in his habitual way to the ostentatious announcement of his candidacy, “and it was about trade, and it was about borders. And what happened is pretty quickly after that, we shot right up, I shot right to the top of the polls and have been leading in the polls almost from the beginning, without fail.” But there was still higher to go, and what Trump said boosted him to the next level was something that took place thousands of miles away:

So, we started and something happened called Paris. Paris happened, and Paris was a disaster. There have been many disasters but, it was Paris, and then we had a case in Los Angeles, it was in California [i.e. San Bernardino], where fourteen young people were killed, and it just goes on and on and on. And what happened with me is, this whole run took on a whole new meaning. Not just borders, not just good trade deals… And the meaning was very simple: we need protection in our country, and that’s going to happen. And all of a sudden the poll numbers shot up, and I’m just very proud to be a part of this…

It’s true that Trump glossed Paris as illustrating the terrorist threat to what’s called the homeland, and that his solution was the infamous proposal to ban all Muslims from entering the country—two domestic-minded notions. But Trump didn’t mention his Muslim ban on Tuesday; he did mention ISIS, and the need to escalate military operations in the Middle East. “More than anything else,” Trump vowed, “this country is going to start winning again. We don’t win anymore. We don’t win with our military, we can’t beat ISIS. We’re going to knock the hell out of them.”

On national security, Trump has tried to position himself as the candidate taking the hardest line. He has pledged to “take out” the families of ISIS members and said he would bring back waterboarding as well as “a hell of a lot worse than waterboarding.” The intention seems to be to outflank Ted Cruz, who has called repeatedly for ISIS to be carpet-bombed but also expressed wishy-washy opposition to torture. At the same time, Trump has harshly criticized the Iraq War, which he called “a big, fat mistake.” He has even alluded to the causal relation between the decision to invade and the rise of ISIS: “George Bush made a mistake. We can make mistakes, but that one was a beauty. We should have never been in Iraq. We have destabilized the Middle East.” (This was in February; Trump had previously hewed to the Republican line that Hillary Clinton and Barack Obama were responsible for creating ISIS.) Trump has gone so far as to pretend he opposed the war before it began, claiming to have predicted its deleterious effects: “[Bush] went into Iraq. He started something that destroyed the Middle East. And I said, ‘Don’t go in because you’re going to ruin the balance in the Middle East, you’re going to have a total imbalance; you’re going to have Iran taking over Iraq.’ Everything I said turned out to be true.”

This combination of extreme hawkishness on ISIS and excoriation of the Bush administration is unique among presidential candidates. And it works because it reconciles a deep conflict in the public psyche. On the one hand, people largely think the invasion was a mistake. A June 2014 NBC/Wall Street Journal poll found that “a huge majority” regretted the war, with 71% saying it “wasn’t worth it”; “Just 22 percent now believe the 2003 war effort was worthwhile.” Interestingly, Gallup reported one year later that antiwar sentiment was at 51%, down from 57% by its reckoning in 2014. “These most recent findings rank as one of the most ‘positive’ assessments of the Iraq war since September 2006, when the country was evenly divided on this question,” the polling firm reported. What had changed? “U.S. military involvement,” Gallup noted, “could be characterized as on the rise, or at least not on the wane. This week, President Barack Obama announced the deployment of an additional 450 troops to Iraq to aid in the fight against the militant group Islamic State, bringing the total number of troops sent since June of last year to 3,550. Obama made good in 2011 on a campaign pledge to withdraw all American troops from Iraq, though he has since had to reverse course as the Islamic State group overran portions of the country.” Reflexive support for the troops, and revulsion at deliberately provocative ISIS propaganda, probably accounts for the change in attitudes.

This brings us to the other hand. Though the public may feel burned by what was undeniably a wasteful war launched on trumped-up pretexts, withdrawal is always unacceptable, on patriotic grounds—a sentiment at least as old as the overseas U.S. empire. (“American valor has easily triumphed in both sea and land,” declared Senator David Hill, an advocate of annexing the Philippines, in 1898, “and the American flag floats over newly acquired territory—never, as it is fondly hoped, to be lowered again.”) The advent of ISIS compounded this problem, mocking official claims that American arms had achieved some measure of progress in Iraq. The resultant agony was epitomized by a January 2014 New York Times story, “Falluja’s Fall Stuns Marines Who Fought There“: completely ignoring Iraqi suffering, the reporter rendered vividly the anguish of veterans at the city’s takeover by Sunni insurgents, which left them “transfixed, disbelieving and appalled,” and was “a gut punch to the morale of the Marine Corps and painful for a lot of families who are saying, ‘I thought my son died for a reason.'”

So what is to be done? If invading Iraq was a costly mistake, how can we keep fighting there? But if we paid so dearly for it, how can we not?

Trump shrewdly navigates this cognitive impasse by playing on people’s feelings of regret as well as their desire for revenge. Iraq may have been a mistake, he suggests, but we can right this wrong by smashing ISIS—a vacuous proposal that carries the usual advantage of casting Obama as feckless. “We have a president who just doesn’t get it,” Trump told CNBC shortly after the Paris attacks. “He’s weak and ineffective.” Such clichéd criticism serves to temper Trump’s savaging of Bush, which could alienate some conservatives; it also supplies a kind of dolchstoßlegende, preserving the military’s honor by placing the blame for ISIS on the president. “In all fairness,” Trump has argued, anatomizing the collapse of regional order, “Bush made the decision… And Barack Obama—Barack Obama, as bad as he is, and he’s bad—but he got us out the wrong way. He should have left people there. And he should have done it differently. And he shouldn’t have said, ‘We’re getting out at a specific time.'” Thus Chomsky’s axiom of history is fulfilled: our soldiers didn’t fail to provide security for Iraq, they were simply sold out by a calculating politician. This is also the meaning of Trump’s pledge to rebuild the military, as well as his professed concern for “our veterans,” whom he laments “are treated so badly“: it’s all part of a general betrayal of the troops by their civilian masters.

It may be that, for voters, the country’s economic fortunes are not so separate conceptually from its global stature. People surely recognize, particularly Trump’s older base, that the postwar “golden age of capitalism” coincided with the apogee of U.S. power; both came to an end during the presidency of Richard Nixon, when the Bretton Woods system collapsed and U.S. forces withdrew from Vietnam. A clear connection existed in that case, as the cost of the Vietnam War proved a huge strain on the economy; with the added impact of the oil embargo the result was stagflation, which Jimmy Carter proved unable to fix, even as he failed to secure the release of U.S. hostages in Iran. The public’s response then was to elect a performer-politician promising a return to national greatness, an obviously ominous precedent. The administration of Ronald Reagan proceeded to dismantle the progressive aspects of economic policy, inaugurating the era of extreme inequality, while conducting a savage campaign of repression in Central America under the guise of anticommunism. The national mood was perhaps suggested by a famous line from the 1985 film Rambo: First Blood Part II, in which the title character returns to Vietnam in search of POWs: “Sir, do we get to win this time?” (Today, with respect to Iraq, Trump’s answer is a hyperbolic yes.)

The ghost of Vietnam was finally exorcised by overwhelming victory in the Persian Gulf War, or so it initially seemed: “By God, we’ve kicked the Vietnam syndrome once and for all,” declared George H. W. Bush on March 2, 1991. But that war turned out to be only the opening phase of a (so far) twenty-five year campaign; by the close of his son’s presidency, the disease had returned, once again twinned with economic disaster. (Though causation is far less clear in this case, the argument has been made that the financing of Operation Iraqi Freedom triggered the credit boom in the U.S., hence the asset bubble and eventually the crash.) Anemic recovery from the Great Recession for working people, combined with an ambivalent sense of national retreat, created an atmosphere hospitable to Trump’s incoherent and fanciful demagogy; but we shouldn’t imagine that the ideological basis is something new, or restricted to the right. When Trump warns—after relating a legend from the U.S. war against Muslim insurgents in the Philippines—”We’ve got to start getting tough and we’ve got to start being vigilant and we’ve got to start using our heads or we’re not gonna have a country, folks,” we ought to hear an echo of Lyndon Johnson in 1966: “There are three billion people in the world and we have only 200 million of them. We are outnumbered 15 to 1. If might did make right they would sweep over the United States and take what we have. We have what they want.”