Shortly after the vehicle attack in New York on Tuesday that killed eight people and injured about a dozen others, President Donald Trump took to Twitter to react:

The terrorist came into our country through what is called the "Diversity Visa Lottery Program," a Chuck Schumer beauty. I want merit based.

— Donald J. Trump (@realDonaldTrump) November 1, 2017

We are fighting hard for Merit Based immigration, no more Democrat Lottery Systems. We must get MUCH tougher (and smarter). @foxandfriends

— Donald J. Trump (@realDonaldTrump) November 1, 2017

He was blasting the State Department’s Diversity Visa Program, also known as the green card lottery, for allowing the attacker, an immigrant from Uzbekistan, to come to the US.

But the program’s history might come as a surprise.

The Immigration Act of 1965 eliminated the quotas that used to determine how many people could immigrate to the US from a given country. Instead, it prioritized the immigration of people who have close relatives living in the US or the skills that employers want.

That proved to be a problem for hundreds of thousands of Irish immigrants who wanted to flee an economic crisis at home. The quota system no longer existed, and the majority of Irish people who wanted to immigrate didn’t have close family living in the US or skills that were in high demand.

Many of them chose to come to the US anyway, overstaying their tourist visas and living as undocumented immigrants.

In 1986, Irish American members of Congress proposed a solution: the diversity visa lottery.

Thousands of Irish immigrants won the lottery that year, and by 1995, Congress passed a permanent version of the law. Now, every year, the program gives green cards to 50,000 people chosen randomly from countries with low immigration numbers to the US.   

As for Trump’s claim that the lottery system is linked to terrorism? That’s false, says Peter H. Schuck, a professor emeritus at Yale Law School.

“Everyone who comes into this country on a visa is subject to the same vetting process,” he says. “[The attack in New York] is almost like lightning striking — one would expect that, occasionally, these terrible actions would occur, notwithstanding a perfect vetting process.”

But experts are more mixed on Trump’s plan to ask Congress to eliminate the Diversity Visa Program.  

Carly Goodman noted that the lottery pays for itself in visa application fees and told The Washington Post that “this program is pretty powerful public diplomacy for the US that signals its openness and generosity.”

Schuck disagrees. “It's foolish to select our immigrants on the basis of coin flip,” he says. He favors focusing on immigrants who are highly skilled and on other factors that tend to correlate with economic success in the US.

From PRI's The World ©2017 PRI