There’s something going on. Photo: Patrick Semansky/AP

Last November, voters who considered terrorism the most important issue facing America supported Donald Trump over Hillary Clinton by almost 20 points. It’s unlikely that Trump’s response to last weekend’s terrorist attacks in London caused many of them to regret the choice. Just as in the campaign, he treated the bloodshed as personal validation (“appreciate the congrats for being right,” he wrote after the Orlando nightclub shooting a year ago). Just as in the campaign, he rushed to peddle uncertain information from unreliable outlets. Just as in the campaign, he blamed political correctness and bashed gun control. Just as in the campaign, he took a gratuitous swipe at a Muslim leader — in this case, the mayor of the city that was attacked. And just as in the campaign, he did it all on Twitter.

This stream of post-attack tweets marked a new low in a low and dishonest presidency, at a moment when the right course would have been straightforward: Had Trump merely offered boilerplate condolences, praised first responders, expressed due outrage and horror and solidarity and resolve, he could have spent days watching cable-news commentators extol him as statesmanlike and speculate about a turning point in his presidency. Instead, he further damaged relations with an ally and unleashed a cascade of criticism at a time when he can ill afford it.

But as the record of the campaign shows, when it comes to terrorism, bad policy can be very good politics. Trump’s unhinged response to the London (and prior) attacks may ultimately serve him well — even, or especially, if it makes Americans less safe.

Good policy, by the same token, can be bad politics. Barack Obama entered office intent on putting terrorism in “proper” perspective, as no longer the primary driver of American foreign policy or paramount fear in American life. He was less interested in chest-beating about vanquishing evil than in encouraging resilience and implementing sensible if unglamorous policies, while avoiding counterproductive ones. Even as he ramped up drone strikes and ordered a raid on Osama bin Laden’s compound, he reminded Americans that they were more likely to be killed by a lightning strike or bathtub fall than a terrorist attack; he was more interested in calming and fortifying than swaggering and scaring.

By the end of his eight years in office, there had not been a single attack by a foreign terrorist organization in the United States. Yet as the threat of ISIS-inspired solo attackers, à la Orlando and San Bernardino, started to rise near the end of his second term, approval of U.S. counterterrorism efforts hit a post-9/11 low. Obama may have kept Americans safe, but he did not make them feel safe. So when Trump stood before crowds or cameras and declared that it was time to stop being “so nice and so soft,” audiences roared. And it set the stage for an approach that will, as Trump promised, take Obama’s and do the opposite: undermine counterterrorism policy while exploiting our uniquely perverse counterterrorism politics.

Even before Trump entered office, the main threat on U.S. soil had become one that is especially hard to stop: not highly trained operatives coming from overseas, but solitary and maladjusted Americans, typically radicalized inconsistently and online, often after a life of decidedly non-Islamic delinquency. They act mostly on their own, against soft targets, with any weapon available. (They are aided by the fact that, in the United States, “any weapon available” often means AR-15s and Glock semi-automatics rather than hunting and kitchen knives.) As Trump continues to implement the Obama administration’s military strategy for defeating ISIS — for all his bluster about “bomb[ing] the shit out of … those suckers,” he has stuck pretty much to the same approach and personnel — that threat may, in the short term, grow rather than subside, as ISIS increasingly focuses on the West. And by word and deed, Trump has systematically weakened the measures necessary to counter it.

His reckless handling of code-word intelligence shared by allies makes it less likely that they will readily share sensitive intelligence in the first place — and “the lifeblood of counterterrorism,” said one senior U.S. operative, “is intelligence sharing.” In this respect, it is not just “embarrassing that the White House got into a Twitter fight” in the middle of a serious terrorist incident, as a State Department official told Buzzfeed in response to Trump’s post-London tweets, it is chilling.

Meanwhile, the agencies responsible for counterterrorism policy are largely unstaffed by appointees and, in the case of State Department, facing budgetary evisceration. Within the Department of Homeland Security, an expansive anti-immigration mandate has drawn resources and attention away from functions like the Coast Guard and aviation security, which would see cuts under Trump’s budget. (When you’re avidly hunting every Central American who has driven without a license, there’s less time to look out for real dangers.) The budget would also end support for community groups that combat radicalization and gut aid to local law enforcement. Counterterrorism efforts, according to New York’s police chief, would be “hobbled.”

Trump boasts of his disdain for “political correctness.” He has questioned the loyalty of Muslim-Americans. He has proclaimed that “Islam hates us.” He has called Obama’s refusal to embrace the term “radical Islamic terrorism” a sign not just of weakness, but perhaps also of disloyalty. (“Well, all I can say … there’s something going on.”) But what Trump derides as “political correctness” is in fact crucial to America’s relative success in preventing the proliferation of the kinds of attacks all too common in Europe. When Muslim-American communities are respected, well-integrated, and confident of their future in an open society, they have every reason to help prevent violence by homegrown extremists. (George W. Bush knew this well.) Tips from family members and fellow worshippers lead to many more terrorism arrests than high-tech surveillance.

Finally, Trump routinely violates one of the first pieces of advice from counterterrorism officials and experts: overreacting helps terrorists achieve their goal. Usually it falls to terrorist propagandists to gloat about the damage done by an attacker; now Trump does it for them. It is exactly “the opposite of good messaging after a terror attack,” as one long-time security official puts it, “the kind of thing that terrorism thrives on” — a sense of constant danger, of a society under siege and ready to discard its values and consume itself out of fear. “If he knew what I knew about terrorism, he’d never leave the house,” Trump’s Secretary of Homeland Security, John Kelly, said of a journalist recently. Ariana Grande, back in Manchester within weeks of the bombing at her concert, did a much better job of projecting the right spirit of solidarity and resolve.

There was a reason Trump was ISIS’s preferred candidate in November: For terrorists he is, as one put it to researchers before the election, the “perfect enemy.” By talking about seizing Iraq’s oil, he reinforces the most feverish jihadist myths about America. By saying “hateful things about Muslims,” in the words of an ISIS defector, he “proves that the jihadists are right to fight against the West, because the West is against Islam.” Since his election, ISIS fighters have concluded that Trump “is good for us,” and recruiters have found in his travel ban an ideal hook. To repurpose Trump’s tweet after a federal judge first blocked the ban: “Bad people are very happy.”

Given all that, it is no surprise that some Trump opponents have taken to warning of a Reichstag fire scenario — a security incident opening the way to a sweeping authoritarian crackdown, as in Nazi Germany. (During Watergate there were also cracks about the Reichstag fire.) Trump has already said and done enough to give some credence to those fears, however outlandish they may seem. He could use an attack as a pretext for closing mosques, or pushing through his travel ban, or cracking down on civil liberties, or sweeping up Muslim-Americans. He could reopen black-site prisons, or reinstitute waterboarding, or launch a new war.

But you don’t have to imagine such an extreme scenario to recognize how dangerous the dynamic would be. Trump would only have to respond to an attack here, on his watch, the way he has been responding to terrorist attacks for years. The more attacks happen, the more his talk seems warranted. And the more he talks, the less safe we become.