Members of a caravan of thousands of migrants from Central America return to Mexico in November after U.S. Customs and Border Protection officials sprayed then with tear gas. (Adrees Latif/Reuters)
Greg Grandin teaches history at NYU and is the author of “The Empire of Necessity,” which won the Bancroft Prize in American History, and “Fordlandia,” a finalist for the Pulitzer Prize and National Book Award. His new book, "The End of the Myth: From the Frontier to the Border Wall in the Mind of America," will be published in March.

As the United States careened toward a potential government shutdown over disagreement on financing a wall along the U.S.-Mexico border — a shutdown averted, at least for the moment — one thing Democrats and Republicans agreed on was the need for a “security first” approach to immigration. “We need border security; I think we all agree that we need border security,” President Trump said last week in a tense White House meeting with Democratic leaders. “Yes, we do, we do,” agreed Senate Minority Leader Charles E. Schumer (N.Y.). “See, we get along,” Trump replied, not missing a beat.

Trump has a point. Although they have many substantive disagreements, the center-left and the center-right have long found common ground in the security-first approach. It dates, at least, to President Jimmy Carter’s proposed offer, in 1977, of a limited path to citizenship for undocumented immigrants (who could prove they’d been in the country for seven years) — conditioned on sealing the border to prevent future undocumented immigration and sanctioning employers who hire undocumented workers.

Carter’s legislation didn’t go anywhere, but it legitimized the already-existing idea that the border had to be “controlled,” and unauthorized migration ended before the status of the country’s many millions of undocumented residents could be clarified — that is, before they could be legalized. Nine years later, in 1986, President Ronald Reagan signed into law the Immigration Reform and Control Act, which eventually allowed more than 2 million undocumented migrants to become citizens but also advanced the militarization of immigration policy, including the punishment of employers who hired undocumented workers.

In the run-up to the passage of the Immigration Reform and Control Act, the Reagan administration sent federal agents into workplaces to capture and deport undocumented workers. Those captured complained of the brutality of the raids: “The agents detained us and piled us into camps in heaps,” Everardo Leyva reported to a Mexican newspaper. “Then they gave us what was almost garbage to eat.” Anti-immigration activists were given key positions in immigration enforcement, including Harold Ezell. As the western regional commissioner of the Immigration and Naturalization Service, he once had the Border Patrol line up 3,000 undocumented workers alongside Interstate 5 in northern San Diego County as a warning to other migrants. “They should be afraid of us,” he said. “The ones who are here illegally aren’t supposed to love us.” In 1984, the Border Patrol hired hundreds of new agents and set up, for the first time in its history, 24-hour checkpoints on the interior roads and highways of the Southwest.

“Security first” arguments rest on the assumption that the border can be effectively sealed by extending more and more power to law enforcement agents. It can’t — at least not without a dangerous militarization of society.

Gen. Leonard Chapman, head of the Immigration and Naturalization Service from 1972 to 1977, confronted the dilemma. A World War II veteran and four-star Marine general during the Vietnam War, Chapman had identified undocumented migration as the country’s leading problem. A “vast army” of Mexicans, he told an interviewer in 1976, was “carrying out a silent invasion of the United States.” Yet even as he pushed for hard-line solutions — including strengthening border security and conducting workplace raids — Chapman worried that such solutions would result in a dangerous erosion of rights. “We can’t have a huge army of immigration officers stopping people on the streets to check for citizenship,” he said. “A police state is not the answer.”

New York Times reporter John Crewdson had a similar concern. Starting in the late 1970s, Crewdson published stunning articles about Border Patrol abuse, which included torture, murder and rape of undocumented migrants, including of children, and family separation. Considering the fear under which Mexican migrants lived, and how much police power it would take to end undocumented migration, Crewdson, in a book based on his reporting, asked: “Who wants an American KGB?”

If tyranny ever came to the United States, Chapman and Crewdson were saying, it wouldn’t be because of the usual explanations offered by the left and the right — either a crackdown on assertive workers or the endless expansion of the nanny state. It would be the result of the impossible-to-satisfy desire to secure the country’s exceptional border (unusual both in its length and in the way it separates spectacular prosperity from entrenched poverty) — a border that was policed not, despite what Trump today says, because of national-security concerns (Mexico has been a steadfast ally of the United States for decades) but because of the economic inequality that drives migration.

Chapman’s and Crewdson’s warnings have proved prophetic. “We have no intention of breaking up families of those who are already here,” Chapman said. But as immigration policy hardened over the following decades, the breaking up of families and the targeting of children has occurred with increasing frequency. Today, the United States holds more than 10,000 migrant children in custody, in desert detention centers that are supposed to be temporary but sure look permanent.

Over the years, both Democrats and Republicans, in their quixotic quest to replicate the “great compromise” of Reagan’s Immigration Reform and Control Act, have embraced policies legitimating the most punishing, illiberal demands of the anti-immigration activists: that migrants could be deprived of fundamental legal protections; that they could be detained indefinitely and tried collectively; that they could be besieged in their workplaces and homes, and denied social services. As Washington spent billions upon billions of dollars in high-tech border interdiction hardware, including ground sensors, drones, surveillance balloons and physical barriers, the size and budget of the Border Patrol, along with, after 2003, the Immigration and Customs Enforcement agency, has grown significantly, as has their warrant to expand their activities deep into the country.

“Tough as nails on border security,” was how Schumer described a 2013 bill, modeled on Reagan’s 1986 law, that would have traded a one-time legalization for some of the more than 10 million undocumented immigrants who qualified, according to the bill’s provisions, for a staggering amount of money for more border militarization and migrant policing. That bill did not advance in Congress; it was killed by coalition of nativists. The nativists got their militarization — public funding for border security kept increasing. The country got Trump.

And still the border brutalists aren’t satisfied. The debate has shifted so far to the right that any kind of compromise regarding citizenship is off the table. So we have shifted from “security first” to “security only.” Trump, in the current round of budget negotiations, merely offers not to shut the government down unless he’s given more billions to build his wall.

To delink support for the rights of migrants from harsh border security policies means that accepting that support for the former can be accompanied by a range of opinions regarding border-control measures. Some activists believe an open border is the only solution; others want a less militarized, more humane, but still effective means of controlling who comes in and out of the country. But wherever one stands on the “security” issue, the Democratic Party needs to stop promising, and funding, a “tough as nails” policy as a quid pro quo for treating migrants with decency.

Nearly four decades ago, Ray Marshall, President Jimmy Carter’s labor secretary, reflecting on the extreme vulnerably of undocumented migrants, said that he expected “another civil rights struggle in our nation in 10 or 15 years.” The time for such a movement is now.

Schumer and other Democratic leaders may think they are constrained by public opinion from detaching justice for undocumented immigrants from hard-line rhetoric about security. But on this, the public is well ahead of their political leaders, with polls (including one from Fox News Channel) indicating majority support, from all regions of the country, including the South, for giving undocumented migrants a way to legalize their status, including the attainment of citizenship. None of these polls asked respondents if Washington should condition such legalization on a strengthening of border security. In fact, surveys indicate that there is significantly greater support for a broad range of immigrant rights today than there was for the civil rights movement in the early 1960s, a fact that should stiffen the spines of Democrats.

An embrace of the rights of migrant workers and asylum seekers — including an expansion of Deferred Action for Childhood Arrivals and the establishment of a path to citizenship for undocumented workers — is a righteous cause, and the only way to beat back the broader nativist right. Just as the United States couldn’t have Jim Crow apartheid and Bull Conner police departments and still call its political system liberal and democratic, it can’t have a shadow class of more than 10 million disenfranchised residents, filling some of the country’s most essential jobs, living in fear of an unaccountable immigration enforcement bureaucracy, and still be considered an open, free society.