What makes America unsafe? Is it a welcoming attitude towards ordinary law-abiding Muslims and other disparate peoples scattered across the globe? Or is it the enactment of policies that indiscriminately and unfairly harm average people?

If you’re President Trump, it’s undoubtedly the former. Trump has spent the last few days attacking the judge who stayed his Muslim ban, claiming it “put our country in such peril” and that without the ban “we can never have the security and safety to which we are entitled.”

But a recently released letter to President Obama written by alleged September 11 mastermind Khalid Shaikh Mohammad suggests a different conclusion.

The eighteen-page letter, dated January 8, 2015 and written while Mohammad was serving time in Guantanamo, was obtained by the Miami Herald from Mohammad’s lawyers after a court-ordered thirty-day review period to remove any sensitive information. The letter lays out Mohammad’s grievances against the United States and makes clear what we have long known from other terrorists’ testimonies: that it’s a decades-long, destructive and largely bipartisan Washington foreign policy that drives such men to commit acts of terror, not the supposedly malevolent influence of a fundamentalist version of Islam.

Mohammad’s defense attorney, David Niven, told the Miami Herald that Mohammad began writing the letter in 2014 during Israel’s 2014 Operation Protective Edge, which levelled whole neighborhoods in Gaza and killed more than two thousand Palestinians in fifty days, the vast majority of which were civilians and many of which were children. Indeed, just four sentences in, Mohammad accuses Obama of having hands “still wet with the blood of our brothers and sisters and children who were killed in Gaza,” citing the horrific statistics coming out of the assault.

A large part of the letter is devoted to answering the question, “Why did 9/11 Happen? And Why May it Happen Again?” Central to the causes of such attacks, according to Mohammad, is Israel’s nearly seventy-year old occupation of Palestine and its continued apartheid policies against the Palestinian people.

“The war crimes perpetrated in Palestine since 1948, and those taking place in Gaza today, are the clearest indication of why 9/11 happened, and why it may happen again in the future,” Mohammad writes immediately after posing the question.

Indeed, resentment at Israel’s policies, and continued US support for said policies, is shot through the letter. Dozens of angry references to Israel, Gaza, and the plight of the Palestinians line its text, including Israel’s 1982 invasion of Lebanon, its slaying of four children on a Gaza beach in 2014, and its continued domination over Palestinian airspace, waters, and movement. Enclosed with the letter is a map of Palestinian loss of land between 1946 and 2010.

At one point, Mohammad strikes a Trumpian note, arguing that the United States’ substantial financial support for Israel comes at the expense of its own domestic stability.

“Do you realize that Israel is a wealthy nation with a higher per capita income than Romania, Spain, Egypt, South Korea, and Saudi Arabia, while the US is an increasingly indebted country damaging its own social programs in favor of your spoiled, coddled, pampered baby, Israel?” he writes. (Mohammad isn’t totally accurate: At least as of this year, according to World Bank figures, South Korea’s per capita is income is slightly higher than Israel’s; Saudi Arabia’s is substantially higher. Still, the point stands.)

Mohammad goes on to label Obama “the president of soup kitchens and food stamps” who cuts “money from the budget for US education and health programs” while “providing money to put the tools of killing and destruction into the hands of Israel to be used against Palestinian and Lebanese Muslims.” (In his final year in office, Obama signed off on the largest military aid package to any country in history, which went to Israel).

Israel’s policies aren’t the sole focus of Mohammad’s ire. Throughout the letter, he lists off a litany of US policies that have enraged him, including:

The Reagan administration’s support for Saddam Hussein during the Iran-Iraq War throughout the 1980s, including his use of chemical weapons against Iranians and Kurds.

US support for various autocratic, kleptocratic regimes throughout the Middle East, from the House of Saud to current Egyptian strongman Abel Fattah El-Sisi.

Crippling UN sanctions on Iraq, pushed first by the George H. W. Bush administration and continued and defended by the Clinton administration, which killed thousands of Iraqi children by the end of the 1990s. Clinton’s Secretary of State, Madeleine Albright, infamously told 60 Minutes that “the price is worth it,” an incident referenced specifically in the letter.

The George W. Bush administration’s post-9/11 regime of torture and indefinite detention, including of minors.

The disastrous 2003 invasion of Iraq.

Bush and Obama’s use of drones, with specific reference to the bombing of an Afghan wedding party in 2008 and the killing of innocent sixteen-year old US citizen Abdulrahman Al-Awlaki in 2012.

Ironically, despite his condemnation of Israel’s collective punishment of Palestinians and his disapproval of sanctions — which he says “are the most brutal form of war because they punish an entire population” — Mohammad has no problem applying the same warped logic to the American public, claiming they “bear full responsibility for the crimes” of Israel and Middle Eastern dictators.

It would be easy to write off the letter as disingenuous grandstanding. After all, he at one point discusses Osama bin Laden’s supposed “mercy and compassion” on the basis that 9/11 killed few children and didn’t target residential homes — which, while true, is hardly enough for a moral exculpation of the heinous act of 9/11.

But this letter is hardly the first time the public has been explicitly told by perpetrators of terror that Western governments’ foreign policies are responsible for the rage behind anti-Western terrorist attacks.

As Thomas Hegghammer has pointed out, bin Laden and al-Qaeda spent the years before and after 9/11 railing against Israeli occupation of Palestine, as well as other Israeli actions. His earliest public speeches in the 1980s called for a boycott of US goods over its support for Israel. In a 2008 speech, he said that “the Palestinian cause has been the main factor that, since my early childhood, fueled my desire, and that of the 19 freemen [the September 11 bombers].”

“The events that affected my soul in a direct way started in 1982 when America permitted the Israelis to invade Lebanon,” he said in a 2004 speech. “As I looked at those demolished towers in Lebanon, it entered my mind that we should punish the oppressor in kind and that we should destroy towers in America.”

In bin Laden’s 2002 “letter to America,” the word “Palestine” appears thirteen times, and conditions in Palestine are the very first thing bin Laden discusses — at length — in relation to the question, “Why are we fighting and opposing you?” In the same letter, he also cites the suffering caused by the Iraqi sanctions, albeit using the wildly inflated number of 1.5 million dead children.

This isn’t just true of bin Laden. The 2010 Times Square would-be bomber was radicalized over a period of years thanks to his anger over the invasion of Iraq, the Guantanamo Bay prison, and drone bombings, and complained about drone attacks on Pakistan in his trial. The Fort Hood gunman was fiercely opposed to the Iraq and Afghanistan wars. One of the killers of British soldier Lee Rigby said he was motivated by his “disgust” at the Iraq War. One of the Charlie Hebdo shooters was radicalized by the images of torture at Abu Ghraib. The Orlando nightclub gunman, while almost certainly partly influenced by his own conflicted sexuality, also told a 911 operator he wanted “America to stop bombing” Afghanistan. The list goes on and on and on.

Despite this, the Trump administration is continuing — or even escalating — the foreign policy excesses of the Bush and Obama administrations that have fuelled the rise of such terrorism. Under Obama, the population of illegal Israeli settlements in the West Bank grew by 25 percent between 2009 and 2014; now, encouraged by Trump’s win, Israel has expanded these settlements and retroactively legalized nearly 4,000 illegal homes in the West Bank.

Last month, Trump approved a commando raid in Yemen that resulted in the death of as many as thirty civilians, including the eight-year old sister of the sixteen-year old American who was drone bombed by Obama in 2012 and which saw its chief target escape unharmed. (According to The Independent, the raid was urged on by General James Mattis, who was meant to be a “stabilizing and moderating force” on the new president). Experts are already warning that terrorists will use the incident to recruit the disaffected.

It’s not as if the Trump administration is oblivious to this. Michael Flynn, his National Security Adviser (and one of the men who reportedly attended the dinner where Trump was briefed on the Yemen raid), has repeatedly stressed the inadequacy and self-defeating nature of a purely military strategy to combat terrorism, and warned in a 2010 paper that “merely killing insurgents usually serves to multiply enemies rather than subtract them.”

Yet despite this, the administration appears to have no intention of reversing course on the decades of failed foreign policy which has only served to inflame terrorism. In fact, it’s doubling down on even more extreme measures like its Muslim ban, which even Trump’s own appointees have warned will create blowback. Confirming experts’ worst fears, ISIS supporters are already celebrating the executive order as an “invaluable service” to the group, which bases its recruitment on a narrative of indiscriminate Western warfare on Muslims. Indeed Trump’s candidacy, with his Islamophobic policies and promises of war crimes to come, has already been used in terrorist recruitment videos.

Of course, such discriminatory policies will do nothing to protect Americans. As Khalid Shaikh Mohammad’s letter and the testimony of other terrorists make clear, the factors which make the United States less safe are staring us in the face. But don’t expect any American leaders to listen.