Covid-19 has Americans reexamining their assumptions about whose work is essential. While many industries have shuttered overnight, the importance of those responsible for keeping our food supply available, from grocery store employees to delivery drivers, has become far more visible. That includes farmworkers — the vast majority immigrants — who continue to work, often in poor conditions, to ensure America won’t go hungry.

As the nation reels from the economic shock induced by the pandemic and by the economic disruptions it will continue to cause, immigrant farmworkers are sustaining us. They deserve economic support, worker protections and our gratitude — and the story of the iconic leader of the farmworkers’ movement decades ago may provide guidance for how to build political support for such measures.

March 31 is a federal commemorative holiday that celebrates the birth of the late Cesar Chavez, who led the farmworker movement in the 1960s and 1970s. Chavez was an iconic, transformative figure who is rightly celebrated for his labor and civil rights activism. Yet on immigration, Chavez held complex, often contradictory views, which evolved over time. Tracing his transformation may shed light on how we can support farmworkers’ rights today.

Early in the farmworker struggle, Chavez held decidedly anti-immigrant views. There was a logic and a history to this position. Historically, labor unions had been wary of immigrants, seeing in them wage competition and recognizing they were often useful strategically for employers to break strikes and undermine working-class solidarity. This dynamic was true in agricultural work as well. Native-born farmworkers’ fear about immigrant labor competition was amplified when the United States and Mexico agreed to the Bracero program during World War II, which brought millions of Mexican guest workers to America for seasonal work contracts during and after the war.

The bracero program pitted farmworkers who were citizens, often Mexican Americans, against noncitizens, mostly Mexican, even though they both faced the same exploitative conditions. These conditions sparked powerful labor activism. Ernesto Galarza, a Mexican American labor organizer working in the 1940s-1960s, believed labor conditions on farms could only improve if the bracero program was terminated. Although the program was supposed to allow growers to import workers only when domestic laborers could not be found and ostensibly required them to pay “prevailing wages,” growers manufactured shortages and set low wage levels.

With tremendous power to contract an endless supply of desperate, poorly paid laborers from south of the border, growers kept U.S.-born laborers powerless. Though Galarza sympathized with Mexican workers, he also understood the harsh realities of labor economics and his first priority was U.S. citizen workers. After years of protest, lobbying and pressure, Galarza and his labor allies succeeded in bringing the bracero program to an end in 1964.

By bringing public attention to the dire working conditions of braceros and other farmworkers, the effort had its first success with the closure of the program. Yet, at the same time the program ended, a new labor problem emerged that set the movement back.

Although Congress created in 1965 new restrictions on the legal immigration of people from Western Hemisphere countries, including Mexico, growers continued to recruit them as workers. But instead of coming through the legal bracero program, people came without legal authorization. A new class of cheap labor with limited legal rights and little power to demand better working conditions or higher wages came to dominate farm work: undocumented immigrants.

Cesar Chavez had succeeded Galarza as the leader of the farmworker movement in California by this time. He took a hard line, arguing that unsanctioned immigrants “were playing an instrumental role in breaking strikes.” He led the United Farm Workers union, which was made up of mostly Mexican Americans, who felt they were being displaced by immigrant workers or compelled to work for depressed wages. It became so desperate that it 1973, it formed its own “border patrol,” which became known as the so-called wet line along the U.S.-Mexico border near Yuma, Ariz. to try to physically prevent undocumented workers from reaching the fields. With Chavez’s knowledge (and likely, his blessing) these union guards intercepted, turned over to authorities and sometimes even physically assaulted undocumented workers.

But this campaign, which aimed at protecting the native-born workforce, deeply disturbed many Mexican Americans inside and outside the union. Some labor allies had taken a different path and worked to organize immigrant workers to demand better conditions for all workers regardless of immigration status. They expressed alarm at the news that the UFW patrol was intercepting and punishing migrants.

Among them was Bert Corona, a Chicano rights and civil rights activist, who worked for many organizations in a long life of activism. He urged Chavez to reconsider his strategy and to focus on “the real enemy” — the employers exploiting farmworkers regardless of nationality. Increasingly, creative ethnic organizers like Corona and his labor partner Soledad “Chole” Alatorre, a Chicana activist based in the Los Angeles area, argued that immigrant workers not only could be persuaded against scabbing but that they also could be turned into valuable allies for all farmworkers.

Over time, thanks to the insights of other activists and immigrant workers themselves, Chavez’s views began to evolve, and by the late 1970s, he advocated for the legalization of unauthorized immigrants and encouraged their inclusion in the labor movement. Partly he did so because he understood that the labor force he represented was increasingly made up of undocumented workers. Partly, however, it was the pressure he faced from peers like Corona, as well as immigrants themselves, who resented being attacked and alienated by “our own people” — Mexican Americans.

Chavez’s complicated legacy on the immigration issue has been fodder for both right and left, who have often misremembered, misunderstood and misappropriated his ideas. Conservatives have sometimes embraced Chavez because they see in him a reflection of their own nativism. The right often quotes Chavez’s early positions and his denunciations of “illegals” to depict him as a “border hawk” and a “border control proponent.” Over the past two years, legislators have even proposed official proclamations that would make Chavez’s birthday “National Border Control Day.”

On the other hand, many liberals only celebrate the latter part of Cesar’s story. Too often, Chavez is depicted as a “champion of immigrants’ rights,” as the union he led puts it today. Dolores Huerta, Chavez’s longtime organizing partner and heir to the union leadership has characterized Chavez’s views in simplistic terms, saying, “We wanted people not to break the strikes period. We’re not against people who are undocumented.” But Huerta is not being quite honest, either. Chavez’s stance did change, but his long anti-immigrant campaign had, by 1975, already alienated many allies and undocumented people themselves.

The debate on immigration too frequently pits citizens against immigrants and suggests our needs, values and priorities are not always aligned. But as the history of Chavez’s evolution on immigration demonstrates, there is a way to reconcile them. Immigrants’ rights must be seen as critical labor rights.

Developing smart, humane immigration and labor policies requires political leaders and activists to listen to the voices of allies, supporters and critics, to admit previous mistakes and to be willing to change course before it is too late. The coronavirus pandemic will probably spurn a prolonged economic recovery program that will require substantial immigrant labor to keep Americans fed. Labor unions, governments and ordinary Americans might do well to remember the lessons of the past and to recognize the people doing this important work deserve decent wages, safe working conditions and the legal status that will entitle them to these labor protections.