In a White House meeting with members of Congress this week, President Trump is said to have suggested that the United States accepts too many immigrants from " shithole countries" in Africa and too few from countries like Norway.

Those comments, relayed to NPR by people in attendance at the meeting, set off an immediate firestorm, in part because Trump appeared to be favoring the revival of a discriminatory immigration policy abolished by the U.S. Congress more than 50 years ago.

From 1924 to 1965, the United States allocated immigrant visas on the basis of a candidate's national origin. People coming from Northern and Western European countries were heavily favored over those from countries like those Trump now derides. More than 50,000 immigrant visas were reserved for Germany each year. The United Kingdom had the next biggest share, with about 34,000.

Ireland, with 28,000 slots, and Norway, with 6,400, had the highest quotas as a share of their population. Each country in Asia, meanwhile, had a quota of just 100, while Africans wishing to move to America had to compete for one of just 1,200 visas set aside for the entire continent.

The blatantly discriminatory quota policy was enacted on the basis of recommendations from a congressional commission set up in 1907 to determine who precisely was coming to the United States, which countries they were coming from and what capacities they were bringing with them. Under the leadership of Republican Sen. William Dillingham of Vermont, the commission prepared a report consisting of more than 40 volumes distinguishing desirable ethnicities from those the commission considered less desirable.

"Dictionary of Races or Peoples"

In a "Dictionary of Races or Peoples," the commission reported that Slavic people demonstrated "fanaticism in religion, carelessness as to the business virtues of punctuality and often honesty." Southern Italians were found to be "excitable, impulsive, highly imaginative" but also "impracticable." Foreshadowing Trump's own assessment, the commission concluded that Scandinavians represented "the purest type."

The main sponsor of the 1924 law enacting the national origins quotas was Rep. Albert Johnson, R-Wash., chairman of the House Committee on Immigration. Among Johnson's immigration advisers were John Trevor, the founder of the far-right American Coalition of Patriotic Societies, and Madison Grant, an amateur eugenicist whose writings gave racism a veneer of intellectual legitimacy. In his 1916 book The Passing of the Great Race, Grant separated the human species into Caucasoids, Mongoloids and Negroids, and argued that Caucasoids and Negroids needed to be separated.

The national origin quota system remained in effect for more than 40 years, despite increasing opposition from moderates and liberals. Minor adjustments were made under the 1952 McCarran-Walter Act, which passed over the vigorous objections of President Harry S. Truman.

In a fiery veto message, Truman argued that the national origin quota policy "discriminates, deliberately and intentionally, against many peoples of the world." After Congress dismissed his criticism and overrode his veto, Truman ordered the establishment of a presidential Commission on Immigration and Naturalization.

In its report, the commission concluded that U.S. immigration policy marginalized "the non-white people of the world who constitute between two-thirds and three-fourths of the world's population." The report was titled Whom We Shall Welcome, referring to a speech President George Washington delivered to a group of Irish immigrants in 1783.

"The bosom of America is open to receive not only the Opulent and respectable Stranger," Washington famously said in that speech, "but the oppressed and persecuted of all Nations and Religions, whom we shall welcome to a participation of all our rights and privileges, if by decency and propriety of conduct they appear to merit the enjoyment."

That promise was broken by the enslavement of Africans brought to America in chains, but it set forth the ideal by which U.S. immigration policy was to be judged in the 1950s.

We should not be asking, 'In what country were you born?'

Presidents Dwight Eisenhower and John F. Kennedy both challenged the visa quota system, but it was Lyndon B. Johnson who made its elimination a top priority.

"A nation that was built by the immigrants of all lands can ask those who now seek admission, 'What can you do for our country?' " Johnson said in his 1964 State of the Union speech. "But we should not be asking, 'In what country were you born?' " His administration proposed a reform that would put all nationalities on a roughly equal basis, with immigrant visas awarded largely on the basis of whether the candidates had skills and education considered "especially advantageous" to U.S. interests.

The idea that some countries produced better immigrants than others had support, however, and Johnson's immigration reform proposal ran into substantial opposition. The chairman of the immigration subcommittee of the House Judiciary Committee, Rep. Michael Feighan, D-Ohio, refused even to hold hearings on the administration's bill in 1964 and relented the following year only after coming under heavy pressure from Johnson himself. When Feighan did hold hearings, he made sure supporters of the quota system were given ample opportunity to argue for its continuation.

Among those testifying in its favor was John Trevor Jr., whose father had played a key role in the enactment of the quota system. Trevor argued that the quota system ensured that newcomers would "mirror" the existing U.S. population, ensuring social stability.

Other arguments previewed the rhetoric of Trump campaign rallies more than 50 years later. The president-general of the Daughters of the American Revolution, Adele Sullivan, claimed that choosing immigrants without regard to ethnicity "could result in further unemployment, overladen taxes, to say nothing of a collapse of moral and spiritual values, if nonassimilable aliens of dissimilar background and culture are permitted gradually to overwhelm our country."

Similarly, Sen. John McClellan, D-Ark., asked whether opening the United States to immigrants from Africa would lead to "still more ghettos and thus more and more acts of violence and riots?"

A fellow Democrat, Spessard Holland of Florida, in a speech on the Senate floor, asked, "Why, for the first time, are the emerging nations of Africa to be placed on the same basis as are our mother countries — Britain, Germany, the Scandinavian nations, France, and the other nations from which most Americans have come?"

However, the 1960 census showed that Americans of African slave descent outnumbered Scandinavian Americans by a margin of 2.5 to 1. There were more African-Americans in the United States than there were Americans whose origins lay in Italy, France, the Netherlands, Belgium, Austria and Switzerland combined.

Support for Johnson's immigration reform, however, gained momentum after the passage of the Civil Rights Act of 1964. Vice President Hubert Humphrey, who had pushed for the abolition of national-origin quotas during the 1950s as a U.S. senator, tied the promotion of immigration reform to the civil rights movement, then at its peak.

"We have removed all elements of second-class citizenship from our laws by the Civil Rights Act," he said. "We must in 1965 remove all elements in our immigration law which suggest there are second-class people."

Phenomenon of "chain migration"

With a huge Democratic majority elected the year before, the immigration reform finally passed both houses of Congress in September 1965. Conservatives, led by Ohio's Feighan, however, had insisted on a key change in the legislation, giving immigrant candidates with relatives already in the United States priority over those with "advantageous" skills and education, as the Johnson administration had originally proposed.

That change, which eventually led to the phenomenon of "chain migration" denounced by Trump, was seen as a way to preserve the existing ethnic profile of the U.S. population and discourage the immigration of Asians and Africans who had fewer family ties in the country.

The key reform, however, was achieved. The new law did away with immigration quotas based on national origin.

"This system violated the basic principle of American democracy, the principle that values and rewards each man on the basis of his merit as a man," Johnson declared as he signed the Immigration and Nationality Act of 1965 in the shadow of the Statue of Liberty. "It has been un-American in the highest sense. Today, with my signature, this system is abolished."

For some, the 50th anniversary of the signing of the 1965 legislation, in October 2015, was an occasion for celebration. Muzaffar Chishti, an immigrant from India and a senior lawyer at the Migration Policy Institute, observed at the time that the law sent a message to the rest of the world that "America is not just a place for certain privileged nationalities. We are truly the first universal nation."

"That may have been the promise of the Founding Fathers, but it took a long time to realize it."

In the years since 1965, America has become a truly multicultural nation. But with a U.S. president once again saying that immigrants from some countries are superior to immigrants from other countries, the question is whether America will keep its founders' promise in the years ahead.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.