Donald Trump’s plan to apply an “ideological screening test” on would-be immigrants has been denounced as “un-American” and “a nonstarter.” But the U.S. government already can and does bar immigration on ideological grounds – and has abused that power.

In addition to dramatically expanding government surveillance, the Patriot Act passed by Congress soon after the 9/11 terror attacks allows the State Department to exclude anyone who it determines “undermines the United States efforts to reduce or eliminate terrorist activities.”

The Bush administration used that power to deny entry to leftist activists and administration critics. The list of those denied visas includes South African anti-apartheid activist Adam Habib, Greek economist Yiannis Milios, Nicaraguan reformist and academic Dora Maria Tellez, Bolivian scholar Waskar Ari, and English hip-hop singer M.I.A. — just to name a few.

In 2004, the Bush administration denied entry to Tariq Ramadan, an internationally renowned scholar of Islam and prominent Iraq war critic, who had accepted a tenured position at the University of Notre Dame. Two years later, the ACLU filed suit on behalf of Ramadan — and won — after the government failed to demonstrate any terrorism connection.

But the court did not rule on whether the section of the Patriot Act is constitutional, and it remains on the books to this day.

The Obama administration has also blocked people of certain viewpoints from entering the United States. In 2011, the State Department denied a visa for Kerim Yildiz, a prominent Kurdish rights activist who lives in Britain and was traveling to the United States to accept an award. After the ACLU and PEN sent a joint letter of protest, the State Department issued Yildiz a visa.

In 2013, Palestinian film director Emad Burnat was detained in the Los Angeles Airport and threatened with deportation. He was allowed to enter the United States after security learned he was on his way to the Oscars.

Trump’s proposal would go much further, of course. Trump is calling for every immigrant to be given an actual test, to screen out not only “sympathizers of terrorist groups,” but anyone with “hostile attitudes towards our country and its principles.”

Trump also suggested he was a fan of the McCarran-Walter Act. “In the Cold War, we had an ideological screening test. The time is overdue to develop a new screening test for the threats we face today,” Trump said Monday.

After it was passed in 1952, the act quickly became a tool to bar leftist intellectuals and peace activists — including Palestinian poet Mahmoud Darwish and Nobel-laureate authors Carlos Fuentes and Gabriel Garcia Marquez. In the 1950s, the U.S. even blocked Pierre Trudeau, a progressive intellectual from Canada who went on to become the country’s prime minister in 1968.

Civil liberties advocates have promised to fight any return to Cold War-era policies of exclusion.

“It would raise serious concerns if the government were to decide on a list of acceptable viewpoints, thoughts, and beliefs for Americans, and exclude anyone who failed to conform,” said Dror Ladin, an attorney with the ACLU’s National Security Project, in an email to The Intercept.

Trump’s proposal was greeted with widespread condemnation — and mockery — with some critics saying Trump would not pass his own test. Hillary Clinton released an ad highlighting his past proposal to ban Muslims, his racial comments about a Mexican judge, and his refusal to denounce David Duke, the former grand wizard of the KKK.