Trump adviser Stephen Miller says the new White House plan to amend U.S. immigration law, introduced by Senators Tom Cotton and David Perdue, is “the largest proposed reform to our immigration policy in half a century.”

The White House wants to revisit the 1965 Immigration Act, which opened America’s doors wide to immigrants of color and produced the most sweeping demographic transformation of the country in its history.

Critics of the proposal see it as a thinly veiled effort to constrict the flow of nonwhite groups to the United States. The alt-right leader Richard Spencer, welcoming such a development, told HuffPost the bill “sounds awesome.”

The bill’s proposed changes are certainly significant, but their consequences may not be easily predicted. The key lesson of the 1965 reforms is that social engineering through the adjustment of immigration policy is no simple matter—and almost any such effort will produce dramatic, unintended consequences.

The 1965 Act overturned a longstanding policy of allocating immigrant visas on the basis of national origin, whereby people from northern and western Europe were given highly preferential treatment over those from southern and eastern Europe, the Mediterranean, Africa, or Asia. Once people of all backgrounds were given a roughly equal opportunity to move to the United States, the flow of immigrants changed dramatically.

At the time the Act was passed, arriving immigrants were almost entirely white and European. Fifty years later, nine of 10 newcomers were from outside Europe, and—to the consternation of Miller and other immigration critics—their share of the American population was nearing an all-time high.

“The reality is that the foreign-born population into our country has quadrupled since 1970. That’s a fact,” Miller declared, leaving no doubt he sees such immigration growth as a disturbing development.

“As a result of this [immigration] policy,” he said, “we’ve seen significant reductions in wages for blue-collar workers, massive displacement of African American and Hispanic workers, as well as the displacement of immigrant workers from previous years who oftentimes compete directly against new arrivals who are being paid even less.” In his White House briefing, Miller did not highlight the cultural impact of nonwhite immigration, although he suggested that criticism of the proposal betrayed “a cosmopolitan bias.”

In fact, most economists say immigration has a net economic benefit and is associated more with job creation than with job loss, even though there may be negative effects for the least skilled, least educated native-born workers.

The legislation introduced by Cotton and Perdue and enthusiastically supported by the White House would aim to cut legal immigration to the United States by half, mainly by severely restricting the allocation of legal permanent residence status (green cards) on the basis of family ties.

Currently, naturalized U.S. citizens can sponsor the immigration of spouses, parents, children, and adult siblings. Legal permanent residents can sponsor spouses, minor children, and unmarried adult children. About two-thirds of all immigrants currently achieve legal status because of these family ties.

The proposed legislation would eliminate all family sponsorship beyond spouses and minor children and thus theoretically end the phenomenon of “chain migration,” which Miller defined as what happens when someone sponsors a relative “who can bring in a relative who can bring in a relative.”

The priority instead would be immigrants who score “points” as a result of their ability to speak English, their income prospects, and their marketable job skills. During his presidential campaign, Donald Trump promised to select immigrants “based on their likelihood of success in U.S. society” and their ability “to successfully assimilate.”

Ironically, the original version of the 1965 law had a similar goal, favoring immigrants with skills considered “especially advantageous” to the United States. The priorities were changed, because critics feared that a merit-based system would open the gates to a more diverse immigrant population and thus change the demographic character of the United States.

The provision that Cotton and Perdue are targeting—family sponsorship—was ironically intended as a bulwark against that prospect. The assumption was that amending the law to favor those who already had relatives in the country would produce an immigrant population that matched the racial and ethnic profile of the existing U.S. population. The American Legion, which had fiercely defended a policy preferential to northern and western Europeans, supported the 1965 Act only after it was amended with the family unification preference, a feature the Legion saw as “a naturally operating national origin system.”

It was a profound miscalculation. The supporters of a family-based immigration policy failed to recognize that the desire to move to the United States in the second half of the 20th century was concentrated in the developing countries in Asia, Africa, the Middle East, and Latin America.

The young African with a student visa, the Korean woman who married a U.S. serviceman, and the Indian tech worker who got an employment visa could each sponsor a relative’s immigration, and the pattern of chain migration was quickly established.

The Cotton-Perdue bill aims to undo that unintended consequence. But a “points-based” immigration system like the one backed by the White House could have similarly unexpected effects. Immigrants from Latin America, who have significantly lower levels of education and English proficiency, would be disadvantaged, as would refugees. But immigrants from Asia, the Middle East, and Africa are more likely than the U.S.-born population to have at least some college education.

President Trump proposed a ban on Muslims entering the country during his campaign, but Muslim immigrants are 25 percent more likely than U.S. born residents to have a college degree, and many have valuable high-tech skills. Among immigrant groups, those from sub-Saharan Africa and the Middle East have higher than average English proficiency.

Those immigration critics who think major amendments to the 1965 law might make the country less diverse could be surprised if the changes are implemented. While the bill would likely reduce the flow of some immigrant groups, it could well expand others in ways that would further reshape the American population.