The​ U.S. National Archives in Washington contain a letter to President Truman from a concerned citizen called Phyllis Craig, who accuses him of wanting to “fill our once fine country with morons and other unworthies who are here in large numbers through lax immigration laws to get all they can out of America and bring nothing but filth and self-interest.” The letter is dated June 26, 1952, and written on notepaper from the Roosevelt Hotel in New York City—at that time a prestigious address, but more recently used to house asylum seekers. It was occasioned by Truman’s decision to veto legislation that would have severely restricted immigration; one clause empowered the attorney general to deny visas to foreign citizens intending to engage in activities “prejudicial to the United States” (what kinds of activity would be deemed prejudicial, the bill did not say). Craig wrote that the president’s veto signalled “the defeat of a very fine instrument meant beyond doubt to aid our country.” She was not without hope for the future: “Some day when able men of moral stamina and the sort of patriotism America was founded upon take over, this bill will have its place in the sun and it cannot come too soon for every red-blooded citizen.”

The very next day Congress overrode the presidential veto and passed the McCarran-Walter Act with a two-thirds majority in the House and Senate. The law codified a system of immigration quotas that privileged applicants from Western Europe and almost guaranteed that those from Asia and Africa would be rejected. The section on activities “prejudicial” to the U.S., together with others targeting suspected communists and anarchists, supplied a mechanism which government officials would use over the next decades to justify refusing visas to foreigners whose political views they didn’t like.

Among those turned away on ideological grounds was the Colombian novelist Gabriel García Márquez, who was denied entry because of his stint as an editor at Prensa Latina, the Cuban state news agency. Pablo Neruda was rejected because he was a member of the Communist Party. Charlie Chaplin insisted he was a “peace-monger” rather than a communist, but his re-entry permit was revoked after he left the U.S. to promote a film in Europe. General Nino Pasti, formerly NATO’s deputy supreme commander in Europe for nuclear affairs, wasn’t allowed in because he advocated nuclear non-proliferation. Salvador Allende’s widow, Hortensia, was barred from visiting American universities because of her criticism of General Pinochet, who was responsible for her husband’s death and the takeover of her country. Dario Fo was turned down when he wanted to go to a cultural festival in New York; later he had to wait four years for a visa so that he could attend a Broadway performance of “Accidental Death of an Anarchist.” “Nobody in State thinks that Fo is going to foment revolution or throw bombs,” one American diplomat admitted. “It’s just that Fo’s record of performance with regard to the United States is not good. Dario Fo has never had a good word to say about the United States.”

Over time, the barring of so many prominent writers and artists became an embarrassment, particularly because the U.S. liked to claim that the brutal suppression of dissent behind the Iron Curtain showed the superiority of open societies. The practice persisted, however, even after the U.S. signed the Helsinki Accords in 1975, which affirmed freedoms of thought and belief, and even after Congress narrowed the provisions of the McCarran-Walter Act in 1977. At a congressional hearing in 1984, Arthur Helton, a lawyer and human rights advocate, argued that Americans “face the world, it seems, with fear of the ideas that may invade from abroad.”

In 1972 the Supreme Court heard the case of Kleindienst v. Mandel, which concerned the refusal of a visa to the Belgian economist Ernst Mandel, a Marxist who had been invited to speak at various events in the U.S. American academics challenged the decision by arguing that the government was violating the freedom of speech protected by the First Amendment by unwarrantedly restricting their ability to receive information from abroad. The Court agreed that the denial of Mandel’s visa affected First Amendment rights, but held that it was nonetheless justifiable because Mandel had violated the terms of an earlier visa by speaking at an event where money was solicited for a political cause—a cocktail party at which posters were auctioned to fund the legal defence of students who had participated in the 1968 événements in France. Mandel said he had not been told he was barred from speaking at such events, and William Douglas, Thurgood Marshall, and William Brennan—the liberal justices on the Court—dismissed the government’s rationale. But the effect of the Court’s decision was to leave unsettled the question of whether the First Amendment prevents the government from denying admission to foreign citizens simply because it doesn’t approve of what they have to say.

It was Congress itself that finally moved to retire the practice of barring foreigners because of their political convictions. In 1987 and 1988, it passed legislation temporarily repealing the ideological exclusion provisions of the McCarran-Walter Act, and then repealed them permanently in 1990. The House vote in favor of repeal was unanimous. But because the Supreme Court had sidestepped the constitutional question in the Mandel case, Congress was free to resurrect the practice after the September 2001 attacks—which it quickly did, extending its reach to human rights activists and critics of the war on terror. Dozens were denied visas on ideological grounds in the years after 9/11, with the Bush administration sometimes pointing to provisions of the USA Patriot Act that permitted the government to exclude individuals who had “endorsed or espoused” terrorism. (The State Department’s Foreign Affairs Manual, used by consular officers, noted that the phrase was meant to capture “irresponsible expressions of opinion.”)

One of those excluded during this period was Adam Habib, then a member of South Africa’s Human Sciences Research Council and a vocal critic of America’s war in Iraq. When Habib arrived at John F. Kennedy International Airport in October 2006, border officials interrogated him at length, asking questions about an anti-war rally he had attended, and told him his visa had been cancelled. I was then an attorney at the American Civil Liberties Union—I was in charge of a project on post-9/11 human rights abuses—and represented the American Sociological Association and other groups in the lawsuit the ACLU filed to challenge Habib’s exclusion. We won a favourable ruling from a lower court and then negotiated a settlement with the State Department after Barack Obama became president in 2009. In a letter to the American Sociological Association, the State Department’s legal adviser Harold Koh rejected the practice of ideological exclusion and promised to give “sympathetic weight” to visa applications filed by individuals travelling to the U.S. for what he called “expressive or educational activities.” Habib, who is now vice chancellor of SOAS in London, has visited the U.S. freely since then.

Truman thought that immigration laws were in need of modernization and “general revision,” but saw the McCarran-Walter Act as a betrayal of the country’s values and interests. In his statement accompanying the veto, he complained that the act would “perpetuate injustices of long standing against many other nations of the world, hamper the efforts we are making to rally the men of East and West alike to the cause of freedom, and intensify the repressive and inhumane aspects of our immigration procedures.” He called the ideological exclusion provisions “thought control.” Twenty years later, Justice William Douglas, dissenting in the Mandel case, adopted the phrase to describe the way the provisions were being used. “The attorney general stands astride our international terminals that bring people here to bar those whose ideas are not acceptable to him,” Douglas said.

Ideological exclusion seemed incongruous to Truman in a modern, democratic society in which openness to ideas and people from elsewhere was a source of economic and social strength. The practice seems anachronistic now, when all human knowledge is accessible online, video-conferencing software is installed on every laptop, and ideas and information can be shared instantaneously across borders. Can anyone really believe today that the denial of visas to foreigners with supposedly dangerous beliefs will have the effect of keeping those beliefs at bay?

Yet the purported necessity of identifying people with dangerous opinions is being used to justify surveillance on a mind-boggling scale. Foreign citizens who present themselves at the U.S. border carry smartphones and computers whose contents—messages to banks and lovers, emails to colleagues and friends, texts and sexts, short-form videos never posted to TikTok, photographs taken at public protests, records of charitable contributions to Planned Parenthood or Palestine Legal, half-finished novels—provide evidence of their political views. In the year up to April 2025, U.S. Customs and Border Protection agents searched the electronic devices of 55,318 travelers. There were 4,363 “advanced” searches, in which travellers’ devices were “connected to external equipment” that could review, copy, or analyse the files stored on them. Government agents are not usually allowed to conduct searches like these within the United States without first demonstrating to a magistrate that there is “probable cause” to believe the search would produce evidence of criminal activity. At the border, agents have a freer hand.

In 2015, the Department of Homeland Security carried out pilot programs to test whether it was useful for officials to examine the social media histories of those applying for visas. The pilots failed to establish that such screening was effective—it “adds no value,” one intelligence official concluded—but two years later the State Department began to require certain visa applicants to submit a list of the social media platforms on which they had recently been active together with their usernames. This requirement was extended in 2019 to 14 million people who apply for U.S. visas every year, and early in 2025 the Department of Homeland Security announced that soon it would also extend to millions of people who had already been admitted to the country but were seeking “adjustment of status”: asylum seekers, green card applicants, and naturalization applicants. Late last year, the State Department said it planned to ask for the same information from foreign visitors who don’t require visas to enter the U.S.—those from countries such as Australia, Japan, France, and the U.K. It has also begun requiring some travellers—and sometimes their dependants—to toggle the privacy settings on their social media profiles to “public” in order to facilitate scrutiny.

Both Democrats and Republicans helped create the infrastructure for ideological surveillance at the U.S. border, but the Trump administration is deploying it in the service of a radically partisan and censorial agenda. Last January, an executive order instructed consular officers to examine visa applicants” “online presence” to identify those who have “hostile attitudes” towards American “citizens, culture, government, institutions, or founding principles.” Soon after, the State Department revoked visas held by people from Argentina, South Africa, Mexico, Brazil, Germany, and Paraguay whose social media posts had “celebrated” the killing of the conservative activist Charlie Kirk. In many cases, the purported celebration seems to have consisted of posts characterizing Kirk as a racist, or arguing that he might not have been killed if gun ownership had been regulated in ways he opposed.

The Trump administration has also told consular officers not to issue visas to applicants who have worked on fact-checking, combating misinformation, online safety, or content moderation—activities it characterizes as “censorship.” (At around the same time, the vice president, J.D. Vance, described the EU’s decision to sanction X for its failure to comply with basic transparency requirements as an attack on free speech.) On Christmas Eve, the administration announced that it had revoked the visas and green cards of five Europeans who had supposedly “organized efforts to coerce American platforms to censor, demonetize, and suppress American viewpoints they oppose.” The accusation was preposterous: some of the people involved had criticized the platforms” content moderation policies, but none of them had the power to “suppress American viewpoints.” Only by adopting the administration’s through-the-looking-glass understanding of censorship is the charge legible.

From one perspective, the Trump administration is taking up the practices once enabled by the McCarran-Walter Act, but with MAGA’s prejudices, conspiracy theories, and obsessions substituted for those of the Cold War. Perhaps it is only now, more than 70 years later, that the act is—to use Phyllis Craig’s phrase—enjoying its “place in the sun.” But in its targeting of immigrants inside the United States, the Trump administration is crossing an important legal frontier. The Supreme Court has generally been hostile to the idea that foreign citizens outside the United States have rights protected by the First Amendment—this is why the challenge to Ernst Mandel’s exclusion was filed by American organizations asserting that it infringed their First Amendment right to engage with him. The Court has not always taken the same approach to foreign citizens who have already been admitted to the U.S. In a 1945 case involving the attempted deportation of the Australian labor activist Harry Bridges, the Supreme Court judgment stated that “freedom of speech and of the press is accorded aliens residing in this country”—and in recent years lower courts have repeatedly reaffirmed that principle.

The Trump administration’s most aggressive attempt to purge dissent has focused on foreign citizens deemed to be antisemitic, a concept the administration has defined so capaciously as to encompass virtually any statement that shows sympathy for Palestinians or disapproval of Israel. Fulfilling a campaign promise, Trump announced shortly after taking office that his administration would deport foreign students who had participated in campus protests relating to Israel and Gaza. Over the next weeks, ICE agents arrested and imprisoned a dozen students and revoked the visas of hundreds of others. Mahmoud Khalil, a Palestinian former graduate student at Columbia, was arrested in the lobby of his Columbia-owned building; he had been a prominent presence at the campus protests and had helped other protesters negotiate with the university administration. Rümeysa Öztürk, a graduate student at Tufts, was seized by masked ICE agents on the street in Somerville, Massachusetts, because she had co-written an op-ed calling on her university to engage with students demanding that it divest from companies with ties to Israel. Mohsin Mahdawi, an undergraduate at Columbia, was arrested when he appeared for a scheduled naturalization interview in Vermont. The Trump administration found targets for arrest on canarymission.org, a website of obscure ownership which is dedicated to exposing students and faculty who take part in pro-Palestinian actions.

The Supreme Court​ has not yet had to address whether the Trump administration’s arrests and attempted deportations of student protesters are constitutional. The lower courts have been mainly sympathetic to the students, virtually all of whom have now been released from federal custody—though many were imprisoned for weeks, or even months, and the Trump administration is still trying to enforce deportation orders against them. During the summer, William Young, a federal judge appointed by Reagan in 1985, presided over a trial in Massachusetts in which the American Association of University Professors and the Middle East Studies Association alleged that the Trump administration was targeting foreign students and faculty for arrest and deportation because of their pro-Palestinian advocacy. (I am one of the lawyers for the plaintiffs.) In a 161-page opinion, Young wrote that this policy amounted to a “truly scandalous” effort to suppress constitutionally protected speech. Citing Harry Bridges’s case, he expressly rejected the argument that foreign citizens can be expelled on the basis of their political views, complaining that the administration was acting as if “the First Amendment’s protection of freedom of speech applies to American citizens alone.”

But although the Trump administration’s campaign has so far foundered in court, it is succeeding on campus. At the trial in Massachusetts, the court heard that non-citizen students and academics have withdrawn from political activism at U.S. universities. Academics with green cards testified that they feared attending a protest, signing an open letter or publishing work on Israel and Palestine would result in the upending of their professional and personal lives. This was of course the intention. The purpose of the arrests, as Young observed, was to terrify students and academics into silence and to “staunch public protest related to Israel’s treatment of Palestinians.” That the arresting agents sometimes wore masks was in Young’s view additional evidence that the policy was intended to frighten and intimidate.

One of the scholars who testified was Bernhard Nickel, who came to the U.S. from Germany as a student three decades ago. When the trial began, he had just completed a three-year term as chair of Harvard’s philosophy department. Nickel is a green card holder, not a U.S. citizen, but he had believed that he and his family were secure in the country and had not hesitated to sign an open letter calling for an end to the Israeli occupation, to visit the encampment that Harvard students established in solidarity with Gaza, and to serve as an adviser to students who faced disciplinary proceedings in connection with it. But the arrests in spring 2024 made him aware of his own vulnerability. Watching the video of masked ICE agents arresting Öztürk “was the moment that I actually just decided on a blanket policy that I would keep my head down completely. I would not go to protests. I would not write, I would not sign on to public letters, and any other potential forms of publicity I would just avoid.”

And yet Nickel, in the end, refused to choose silence. He was asked at one point why, if he was so fearful of government retaliation, he had agreed to testify in a case in which ICE was a defendant. “You know, anybody can sign on to an open letter,” he replied.

Anybody can go to a protest. My sense was that, in this trial, somebody in my quite specific situation, somebody who is a senior scholar with a secure position at Harvard and who was not a citizen and who felt the effects of the policy, I don’t know that there are that many people who could have done this. So I thought this is something that’s worth it ... This is still, this is where I live, and I want this to be a country and a nation of laws, not of men. And so I believe in these kinds of processes and procedures. And this is me doing my part.

It seems increasingly certain that one of the cases involving the Trump administration’s ideological deportation policies will come before the Supreme Court—a Court that has so far been solidly sympathetic to the president’s agenda and mostly indifferent to its implications for individual rights and human lives. When the case comes before it, will the Court do its part? “We are not, and we must not become, a nation that imprisons and deports people because we are afraid of what they have to tell us,” Young wrote. We shall see.