In March, an arsonist targeted a mosque in California. Another mosque burned in Connecticut in May. Other mosques have received threats during this holy month of Ramadan. The FBI reported in its latest hate crime statistics that there was a 77 percent increase in anti-Muslim incidents between 2014 and 2017.

In these recent attacks on American Muslims, we have seen the return of shocking ideas that had fueled earlier assaults on religious freedom in the United States. Throughout American history, attacks on religious minorities have returned periodically like cicadas that lay low for a few decades and then emerge again in full force. They followed certain patterns. Peculiar arguments that were made against Baptists in the eighteenth century reappeared in attacks on Mormons and Catholics in the nineteenth and twentieth centuries.

What can we learn about the nature of the modern attacks on Muslims from previous attacks on Mormons, Catholics, and other religious minorities?

First, in the past when Americans wanted to seriously undermine a minority faith they didn’t merely argue that it was an untrue religion but that it wasn’t a religion at all. Samuel Morse, the inventor of the Morse code and the telegraph, led attacks on Catholics in the nineteenth century by saying that “Popery” was less a religion that “a Political system, despotic in its organization, anti-democratic and anti-republican, cannot therefore coexist with American republicanism.” A few decades later, Mormonism was described in similar ways—“an immoral and quasi criminal conspiracy,” as the Kalamazoo Telegraph put it.

Now listen to how Islam has been described by modern American anti-Islam activists. “Islam is a political ideology. It definitely hides behind being a religion,” said Michael Flynn, President Trump’s first national security advisor, in 2016. That same year, a poll found that only half of Republicans said Islam should be legal in America.

In case there was any ambiguity about why this distinction was important, Lieutenant General William G. “Jerry” Boykin, an anti-Muslim activist and former Pentagon official, explained in 2010 that since Islam is “a totalitarian way of life,” it “should not be protected under the First Amendment.”

Second, practitioners of particular minority religions could not assimilate, we were told. An editorial in the Missouri Commercial Appeal took this tactic in describing Mormons: “Their manners, customs, religion and all, [Mormons] are more obnoxious to our citizens than those of the Indians, and they can never live among us in peace.” An anti-Mormon group in Carroll County in 1838 complained that too many Mormons came from across the border. (No, the other border). “It is impossible that the two communities can long live together,” wrote the Signal. “They can never assimilate.” To these writers, the Mormons were alien and dangerous. The next month the governor of the state, Lilburn Boggs, issued a rule that “the Mormons must be treated as enemies, and must be exterminated and driven from the State if necessary for the public peace.”

Three days later, about 250 Missourians, including a state senator, went to a small community called Haun’s Mill and massacred 17 Mormons.

At other moments in history, Catholics, Jews, and other European immigrants were also thought to be unassimilable too.

In modern times, anti-Islam activists have claimed, against evidence, that Muslims are particularly unable to assimilate. When the Islamic Society of Milwaukee applied for permission to build a mosque, a rally was held where one resident explained that “a mosque is a Trojan Horse in a community. Muslims have not come to integrate but to dominate.” Donald Trump made it explicit. “I’m talking about second and third generation,” Donald Trump said during the 2016 campaign. “They come—they don’t—for some reason, there’s no real assimilation.”

In thwarting religious freedom, Americans have accused adherents of minority faiths of having dual allegiances. When Al Smith, a Catholic, ran for president in 1928, cartoons depicted him as kissing the ring of—or serving the liquor to—the pope whom, it was assumed, would be calling the shots. The newly constructed Holland Tunnel in New York was supposedly going to provide the pontiff ready access to America. Jews have long been subject to a similar charge, initially that they would put global Jewry above loyalty to country, and more recently that they would put the interests of Israel over that of America—criticisms that were reflected in the recent comments by Rep. Ilhan Omar that “the political influence in this country that says it is okay to push for allegiance to a foreign country.”

In the twenty-first century, the most pervasive dual loyalty charge has been against American Muslims, like Rep. Omar. They are, we are told, required by their faith to follow Sharia, the broad set of Islamic religious rules, akin to Catholic Canon Law or Halacha rules influencing some Orthodox Jews. Brigitte Gabriel, leader of ACT for America, one of the leading anti-Islam groups, has said, “A practicing Muslim who believes the word of the Koran to be the word of Allah, who abides by Islam, who goes to mosque and prays every Friday, who prays five times a day—this practicing Muslim, who believes in the teachings of the Koran, cannot be a loyal citizen to the United States of America.”

Like the argument that Islam is not a religion, the anti-Sharia drive can be used to break apart First Amendment protections. “Far from being entitled to the protections of our Constitution under the principle of freedom of religion,” wrote anti-Muslim activist Frank Gaffney, Sharia “is actually a seditious assault on our Constitution which we are obliged to prosecute, not protect.” A report issued by his Center for Security Policy in 2010, signed by numerous notable anti-Muslim activists, recommended that Muslims who back Sharia should be prohibited from holding elective office or serving in the military.

President Trump’s familiar attacks on Muslims have often implied dual loyalty, as when he claimed he saw “thousands and thousands” of Muslims in New Jersey cheering the destruction of the Twin Towers on 9/11 or when he maintained that Muslims don’t report suspicious activity. “They’re not turning them in,” he said in a 2016 interview.

Race is, not surprisingly, also a component of attacks on religious minorities. Unpopular groups have often been depicted as non-white. In his anti-Catholic cartoons from the nineteenth century, Thomas Nast depicted Irish Catholics as being physically indistinguishable from American blacks, another marginalized group.

Given the amount of humor created about Mormons being the whitest people in America, it’s surprising to see how they were deemed “Asiatic” because of their embrace of polygamy. A military doctor, Robert Bartholow, in 1861 described a typical Mormon: “yellow, sunken, cadaverous visage; the greenish-colored eye; the thick, protuberant lips, the low forehead; the light, yellowish hair, and the lank, angular person, constitute an appearance so characteristic of the new race, the production of polygamy, as to distinguish them at a glance.”

Of course, racializing the attacks on American Muslims is far easier. What’s interesting is that most attacks on American Muslims conflate them with Arabs, even though most American Muslims are not Arab or from the Middle East.

Generalizations became more general when stereotyping minority religions. Americans became unable to distinguish between the worst elements of a particular faith and the Americans who practice that religion. Opponents of Catholicism for centuries argued that because the Catholic Church had often supported undemocratic regimes in nineteenth and eighteenth-century Europe, American Catholics could not be trusted to support American democracy. In fact, the Vatican did oppose separation of church and state, but American Catholics—including Al Smith and John Kennedy—supported the American model of religious freedom.

Today, anti-Muslim voices routinely conflate Muslim extremists with Muslims in general. When local Tennessee Muslims wanted to build a mosque in Murfreesboro, Tennessee, one of the billboards that popped up to oppose it declared, “Defeat Universal Jihad Now.” After a federal judge struck down an anti-Sharia amendment, Jihad Watch’s Robert Spencer reposted an article titled, “Taliban Chops Off Man’s Hand for Theft,” and asked, “Isn’t it great that Judge Vicki Miles-LaGrange has made Oklahoma safe for Sharia?” Many of the hundreds of acts of violence against American Muslims reveal that inability to make such distinctions. As a sample, in the final quarter of 2015, the attacks against American Muslims included these:

In Bloomington, Indiana, an Indiana University student yelled “Kill them all!” at a Muslim woman prior to slamming her head into a table and attempting to pull off her hijab.

In New York City, three students assaulted a sixth-grade Muslim student during recess. They called her “ISIS,” punched her, and tried to pull off her hijab.

In Pittsburgh, Pennsylvania, a Muslim taxi driver was shot by a passenger asking about ISIS.

In Vandalia, Ohio, while riding on a school bus, a seventh grader threatened to shoot a Muslim schoolmate, calling him “towelhead,” “terrorist,” and “son of ISIS.”

There are, however, some ways in which the experience of American Muslims does differ from past history.

Encouragingly, when Trump first proposed his so-called Muslim ban, thousands of American rallied against it. The courts eventually forced the administration to scale back the measure to be less focused on Islam as the defining factor in immigration. When Trump proposed a registry for Muslims, the head of the Anti-Defamation League declared, “Because I am committed to the fight against anti-Semitism … if one day Muslim-Americans are forced to register their identities, that is the day this proud Jew will register as Muslim.” Notably, as president, Trump has still not created the registry, an indication that the roots of religious liberty have in some quarters grown deep.

But in other ways, this moment is worse or at least more uncertain than earlier periods. We have never had a president of the United States attempt to demonize a particular minority religion as much as this one has. Millard Fillmore ran for president as a Know Nothing, an explicitly anti-Catholic party, but he lost. Richard Nixon was a raving anti-Semite but in private. And even those presidents that wanted to use immigration laws to keep out Catholics or Jews did not offer explicitly religious rationales. We don’t know what it means to have a president actively undermining rather than defending religious freedom.

Second, social media makes it far easier for anti-Muslim sentiment to spread. Much attention has been given to the ways that the internet can radicalize lonely outcasts until they commit mass violence. But the more common role of social media is to normalize previously taboo ideas among respectable people. Posts that evoke strong reactions, either in agreement or in rage, are deemed by algorithms to be more valuable and can be more widely distributed.

Social media doesn’t create hate, but it can incentivize it. The following examples all involve local public officials who got in trouble for posting on Facebook:

A member of the conservation commission of Easton, Massachusetts, posted a photo of a nuclear mushroom cloud with the headline “Dealing with Muslims … Rules of Engagement.”

A member of the Board of Education in Elmwood Park, New Jersey, wrote: “Go back to your own country; America needs to get rid of people like you.”

The Minnesota Republican Party posted a photo of then-Rep. Keith Ellison, a Muslim, on its page, under the headline, “Minnesota’s Head Muslim Goat Humper.”

And yet, the most extreme anti-Muslim voices have also been given platforms by Fox News and influential talk radio personalities.

Looking at the attacks on American Muslims in recent years one must conclude that the consensus around religious liberty is more fragile than it once seemed. The question in coming years will be whether the traditions of religious American freedom—one of our nation’s greatest inventions—will prove enduring.

Steven Waldman is the author of Sacred Liberty: America’s Long, Bloody and Ongoing Fight for Religious Freedom, from which this essay was adapted. He is also co-founder of Report for America.