Bernie Sanders released his immigration plan yesterday. It’s a plan that rejects and redresses the entirety of Trump’s xenophobic agenda, then goes far beyond that to radically break with the decades-long bipartisan war on immigrants that made Trump possible.

Sanders without question now sets the bar on immigration, border, and labor policy, and he has made it clear that immigrants are central to an insurgent American working class and that the working class must be united to win.

“Democrats risk losing the election unless and until they can articulate and advance a unifying agenda that raises wages and conditions for ALL workers across race, gender, class, and, importantly, nationality,” National Day Laborer Organizing Network (NDLON) director Pablo Alvarado said in a statement responding to Sanders’s plan. “The deep divisions caused by the exploitation of immigrant work was the dry timber on which Trump poured his racist kerosene, and the populist fire that is now raging as the result of this arson can only be extinguished when Democrats confront, head on, the centrality of work and workers’ rights within the debate about the future of US immigration policy.”

Sanders’s immigration plan is dedicated to immigrant freedom. It contains no talk of border security or targeting “criminal aliens.” He rejects the establishment’s comprehensive immigration-reform model that has traded draconian enforcement as a putative down payment to buy Republican congressional support for a mass legalization of undocumented immigrants. In other words, Bernie’s plan identifies presidents George W. Bush and Barack Obama’s strategies as a failure.

As the proposal makes clear, the problem with this approach for the last twenty years is that the more anti-immigrant measures were offered and implemented, the more hostile Republicans grew to legalization. Bernie, the plan states:

will not accept delays from Congress, and will not trade limitless and unaccountable funding for border militarization, detention beds, and deportation forces for a deal that has yet to materialize. Bernie will use the constitutional authority vested in the president to take bold and necessary executive action if Congress fails to enact the commonsense immigration reforms supported by the vast majority of Americans.

He promises an immediate moratorium on deportations and pledges to use strong executive action to ensure that a large proportion of undocumented Americans will not be banished from their homes. His fight to win legislation to grant them citizenship will be a fight for legalization as a stand-alone cause, rejecting additional immigration enforcement to woo the Right into backing a compromise they will never accept.

For decades, establishment politicians have deported millions and built hundreds of miles of fencing on the border with Mexico in a quixotic effort to convince Republicans that they are serious about “border security.” This strategy has not only implemented right-wing nativist policy in exchange for nothing, but ratified nativist rhetoric portraying immigrants as threats and the border as insecure. Bernie is right to reject it.

Sanders pledges to increase the number of refugee admissions, including a new climate refugee program to welcome those fleeing the unfolding global environmental disaster that American capitalism has played the lead role in creating. Sanders also proposes greater opportunities for legal immigration by increasing the number of visas based on the principle of family reunification rather than US corporations’ dictates.

Sanders recognizes that US foreign and economic policy — including climate change — is complicit in fomenting migration from Central America, and that we must remake the global economy and deliver economic justice so that people are free to not migrate and stay put if they choose.

In the 1980s, Sanders was a vociferous critic of murderous US intervention against left-wing revolutionaries in Central America. His immigration proposal stays true to that solidarity by recognizing that our deep complicity in making the region unlivable for so many imposes an ethical obligation on us to welcome immigrants and refugees. Bernie’s immigration plan, like his foreign policy, is refreshingly internationalist, calling to “end global inequality and the international race to the bottom so that no human being needs to migrate for survival.”

Sanders calls for radically decriminalizing immigration and breaking the bonds that Democratic and Republican leaders have forged between immigration enforcement and mass incarceration. As the plan rightly notes: “The criminalization of immigrants has wasted billions of taxpayer dollars, dehumanized vulnerable migrants, and swelled already-overcrowded jails and prisons.”

He wants to decriminalize unauthorized border crossings, repealing the statute that Trump has used to separate families. But he won’t wait on Congress to change border policy. Sanders pledges to take executive action to end the systematic prosecution of immigrants for the federal misdemeanor of illegal entry that has been commonplace since the Bush administration. He also wants to end programs that have turned the country’s police, jails, and prisons into the entryway to a massive deportation pipeline, including 287(g), Secure Communities, and the Criminal Alien Program. These programs have simultaneously fueled deportations and mass incarceration. Ending them would curb both.

Specifically, Sanders calls for the repeal of historic anti-immigrant measures signed by President Bill Clinton in 1996 that have made deportations incredibly tough to fight, required mandatory detention for many immigration offenders, barred deportees from lawfully entering for three to ten years, and expanded the number of crimes that subject non-citizens to all but certain deportation. He also calls for checks on the Border Patrol’s police-state powers to question and search people with impunity throughout large swathes of this country.

The criminalization of immigration enforcement — the rise of what activists and scholars call “crimmigration” — has not only been disastrous policy but dangerous politics as well. For decades, politicians including Clinton, Bush, and Obama engaged in rhetoric and implemented policies that portrayed immigrants as a criminal threat. In doing so, they created the political template for Trump to demonize immigrants as just that.

The president infamously announced his campaign in 2015 by declaring that Mexican immigrants are “bringing drugs. They’re bringing crime. They’re rapists.” It was not just the far right but also excruciatingly ordinary bipartisan politics that linked immigration to the war on crime and so gave Trump this language and made it resonate.

Sanders is also clear that making immigration into a national security issue after the September 11 attacks was a disaster, and that “immigration is not a threat to national security.” He calls for breaking up the Department of Homeland Security, Immigration and Customs Enforcement (ICE), and Customs and Border Protection, restructuring and thus taming the enforcement machine.

The integration of immigration enforcement into the War on Terror national security state has turbocharged funding for enforcement while portraying immigrants — particularly Muslims — as a terrorist threat. This is another issue where establishment leaders from both major parties helped create the demonized caricature of the immigrant other that Trump would exploit and take to a new and dangerous level.

Sanders challenges nativist rhetoric that portrays immigrants as a threat to taxpayers through the use of public benefits and to jobs by driving down wages. Since California voters passed Proposition 187 in 1994, the depiction of immigrants as an economic danger has been critical to the power of anti-immigrant politics. But immigrants are far from the only people who have been harmed: the use of racist scapegoating has served to undermine the welfare state for everyone and to divide workers against one another.

Critically, Sanders’s core universal programs are truly universal: Medicare for All and College for All are for all regardless of immigration status. Sanders’s proposal makes clear that immigrants are fellow workers and pledges that his administration would prioritize enforcement of immigrant worker labor rights over immigration enforcement. One way he pledges to do that is by protecting undocumented workers who report labor violations from deportation, a measure long pushed for by NDLON. Allowing immigrants to receive legal status when they blow the whistle on workplace abuse wields the law to erode the very two-tier labor market that the persecution of undocumented immigrants has created.

The politics of this immigration policy agenda are important: by emphasizing that immigrants are core to the working class rather than a threat to it, Sanders strengthens the multiracial coalition that is this country’s only hope for transformative change. Sanders had deep support among Latinos before releasing the immigration plan, and he is counting on their massive turnout to win.

“The issues that we are talking about appeal to the Latino community and young people in general, and that is a lot of Latinos are working for starvation wages — they want to see that minimum wage raised,” Sanders recently told Politico . “I’m the son of an immigrant myself, my father came from Poland without any money. I think I know a little bit about the experience.”

Latinos support Sanders for the same reason everyone else does. They support his working-class agenda — a universal agenda of which this immigration plan now forms an important part.

Bernie has a good record on immigration and consistently voted against the sort of draconian enforcement and border militarization bills embraced by many establishment Democrats. But he has also described immigration in troublingly nationalist terms in the past. This plan shows that Bernie has come to understand that bosses and government repression of immigrants, and not immigrant workers, are what undermine labor standards.

People say that Bernie never changes his mind. That’s not entirely true. It’s just that when he does, he moves in the right direction.