A shocking chapter in American history—unknown to most Americans—unfolds in the new documentary The Chinese Exclusion Act. For more than 60 years—between 1882 and 1943—federal law banned Chinese workers from immigrating to the United States. It marked the first time legislation was enacted to prevent a specific ethnic group from entering this country.

“The majority of people don’t know about it,” states filmmaker Li-Shin Yu, who co-directed with Ric Burns. “Even Chinese Americans themselves don’t know. I, myself, did not know.”

The Chinese Exclusion Act premieres on PBS Tuesday night, just before the May 31 deadline for Emmy qualification, making it eligible for nominations this year. The directors embarked on the project six years ago, well before the current immigration debate intensified with the election of President Trump, who has made building a wall along the U.S.-Mexico border a signature goal, not to mention barring entry to the U.S. by people from a number of Muslim-majority countries.

PBS

“The circumstances of the last two years, as they evolved around the context of the film, it was really quite extraordinary to see that happen,” Burns tells Deadline. “There is kind of a hair-raising sense of its relevance.”

The film delves into the reasons the Chinese Exclusion Act was pushed through, over the objections of many political leaders of the time who viewed it as un-American. Just as is the case today, economic factors were in play, along with fears over security. Many Chinese first immigrated in search of fortune in the midst of the California Gold Rush in the mid-1850s, their presence an irritant to rival prospectors. More Chinese laborers were later recruited to work on the first transcontinental railroad. But an economic downturn in the 1870s made Chinese immigrants a convenient scapegoat, the film maintains.

“The rhetoric that…led to exclusion, and kept it in place for 61 years, remains exactly the [same] today. ‘Some group is gonna come and steal our jobs,’ and/or, ‘Some group is gonna come kill us in our beds,’” Burns asserts. “The Chinese were described in both ways in the 19th century, and into the early part of the 20th century. They were kind of a particularly toxic, really not quite human race who were going to come and steal our jobs. So now we parse that out to Mexicans and Muslims.”

The film draws on images from decades ago to show how Chinese immigrants were portrayed in popular culture.

PBS

“You had The Wasp…you had Harper’s—all these magazines of the time were full of illustrations and articles [with] these really virulent depictions,” Yu explains. “The visual depiction of Chinese as rat-eating, of needing to build a wall to keep the hordes of Chinese from crossing the Pacific into our nation…it becomes this really powerful messaging.”

The exclusion act not only prevented many Chinese from coming to these shores, but endangered those who were already here.

“It essentially legitimized people to think of Chinese as this unassimilable ‘other’ people, that you can do what you want with,” Yu notes. “Exclude them, chase them out of towns.”

In 1885 white miners in Sweetwater County, Wyoming attacked a group of Chinese immigrants, claiming more than two dozen lives. It was not an isolated incident.

PBS

“The license the exclusion act gives is horrific and breathtaking,” Burns observes. “There are up to 300 purges in towns and cities primarily across the American West in the decades after the implementation in 1882. Eureka, California drove out every last Chinese person there, and then passed a city ordinance saying Chinese couldn’t be in Eureka, which is on the books down to the 1950s.”

The exclusion act was not repealed until 1943, in the midst of World War II when China was an ally and another Asian country was the enemy.

“So suddenly this country had to express Chinese as the ‘good Asian’ [versus] a ‘bad Asian,’ which were the Japanese we were fighting against,” Yu comments. “Very quickly after the war, in ’49 when Communist China took over politically, once again the Chinese became this feared potential ‘Fifth Column’ in the country.”

Burns says the history covered in the film points to a fundamental disconnect in American society.

“Americans feel no cognitive dissonance about saying we are a nation of immigrants and welcome immigrants. ‘Everybody wants to come here. They come here because we’re the greatest place in the world, and by the way, let’s build a wall. We gotta keep them out,’” he remarks. “That does not strike many—probably most Americans—as a contradiction of any kind.”

PBS

He adds, “America was built and has proceeded within this ambivalence…So much of our law, politics, economy, social structure is kind of caught in this ever-shifting ambivalence about immigration, citizenship. Who can be an American? Who’s going to belong? Who gets to decide that? All these are the big questions. In the middle of it is the American question of all questions, whiteness and race.”

Yu says The Chinese Exclusion Act invites viewers “to look at this history, use it as a mirror to look inward. Look, we have been like this for a very long time. This is essentially who were are, but is this who we want to be? Be informed, know the facts, know the history.”