The morning after a vehicular terrorist attack in New York City killed at least eight people and injured a dozen others, President Donald Trump blamed Senate Minority Leader Chuck Schumer, whose constituents were among the casualties.

Trump on Nov. 1 tweeted, "The terrorist came into our country through what is called the ‘Diversity Visa Lottery Program,’ a Chuck Schumer beauty. I want merit based."

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

Hours later at a news conference, New York Gov. Andrew Cuomo said Trump’s tweet was "not helpful" and "wasn’t even accurate as far as I’m concerned, about the bipartisan law that was passed."

What do the facts really show?

It was misleading of Trump to fully place the lottery program on Schumer’s shoulders. He did sponsor immigration legislation that contained the lottery system. But Trump's tweet ignores the support the measure earned from Republicans as well as Schumer’s more recent actions to rescind the lottery.

A picture of suspect Sayfullo Saipov is displayed during a news conference about the attack along a bike path in lower Manhattan that is being called a terrorist incident on Nov. 1, 2017, in New York City. (Getty)

What is the diversity visa program?

Trump said the suspect, Sayfullo Saipov, entered the United States from Uzbekistan under the diversity visa program.

The roots of the diversity visa program stem from consequences of a landmark overhaul in 1965 that led to large numbers of immigrants from Asia and Latin America. It moved from a country-by-country quota system to neutral country-of-origin selection criteria for green cards.

By the late 1970s and 1980s, a large group of Irish nationals, primarily on the eastern seaboard, had arrived on temporary visas and overstayed, remaining illegally in the country.

Irish-American and Italian-American members of Congress joined forces to pass the Immigration Act of 1990, creating a system that would effectively help distant Irish and Italian relatives of those immigrants come to the United States and live permanently and legally.

"This lottery was created for Irish and Italians by Irish and Italian Americans, but after a while the beneficiaries lost interest in it," said Anna O. Law, Herbert Kurz Chair of Constitutional Rights at CUNY Brooklyn College. "The countries that are very enthusiastic about the program are in Africa."

An annual random lottery system began selecting applicants in 1995 from countries that had low immigration levels in the previous five years, with a cap of 55,000 immigrant visas a year to recipients who meet education or work requirements. The cap is now 50,000, after Congress decided to allocate 5,000 of the 55,000 annual visas to people eligible for the Nicaraguan and Central American Relief Act program.

Trump wants to eliminate the diversity visa program and shift to a merit-based immigration system.

Schumer was involved in the program’s creation. But there’s more to the legislative story.

What was Schumer’s role in creating the lottery?

Enacting a diversity lottery had a long and winding road in Congress. It was driven by Democrats but earned Republican votes from many recognizable names today.

The White House pointed us to a bill -- H.R. 4165 -- that was introduced on March 1, 1990, when Schumer was serving in the House. Schumer was the lead sponsor of the bill, which had many provisions, including language on diversity visas.

That bill received hearings in the House but was eventually rolled into another bill, H.R. 4300. The Democratic-controlled House passed the bill on Oct. 3, 1990, by a margin of 231-192.

By party, Democrats supported it 186-65, while Republicans went 47-127. Schumer voted yes -- along with four other Republicans still serving in the House. The four were Dana Rohrabacher of California, Ileana Ros-Lehtinen of Florida, Chris Smith of New Jersey and Don Young of Alaska.

Another yes vote came from future Republican House Speaker Newt Gingrich, a frequent Trump ally.

Meanwhile, the Senate pursued a companion bill -- S. 358 -- that included the diversity lottery provision, sponsored by the late Sen. Edward Kennedy, D-Mass.

On Oct. 26, 1990, the Democratic-controlled Senate approved a conference report -- a version of the bill to be taken up in both chambers with identical language -- by an 89-8 margin.

Republicans who supported the measure included Senate Majority Leader Mitch McConnell, R-Ky., who was then a first-termer, and current Republican Sens. Thad Cochran of Mississippi, Chuck Grassley of Iowa, Orrin Hatch of Utah, John McCain of Arizona, and Richard Shelby of Alabama (who was then a Democrat).

In addition, Trump’s director of national intelligence, Dan Coats, voted for the conference report.

The House approved the conference report the following day, by a 264-118 margin. This time, a majority of House Republicans voted for the measure, 93-64. The Republican yes votes included Rohrabacher and Ros-Lehtinen, along with two other GOP lawmakers still serving, Joe Barton of Texas and Fred Upton of Michigan.

The House passage sent the measure to the desk of President George H.W. Bush. On Nov. 29, 1990, Bush signed it, saying he was "pleased" to do so. "This act recognizes the fundamental importance and historic contributions of immigrants to our country," Bush said upon signing the bill.

"Most members of Congress wanted mainly to increase the number of European immigrants, whom they felt were underrepresented in modern U.S. immigration," said Stephen H. Legomsky, an emeritus law professor at Washington University in St. Louis. "As it turned out, the overwhelming majority of diversity visas have gone to Europeans and Africans in roughly equal numbers, far more than to immigrants from any other continents."

Schumer’s efforts to eliminate the lottery

Whatever responsibility you attribute the program's existence to Schumer, Trump’s tweet ignores his more recent efforts to eliminate the program.

During the 2013 effort to pass a comprehensive immigration overhaul, Schumer was one of the bipartisan "gang of eight" that negotiated a bill that, among other things, would have eliminated the diversity lottery.

Sen. Jeff Flake, R-Ariz., who also belonged to the "gang of eight," replied to Trump’s tweet by offering his support for Schumer. "Actually, the Gang of 8, including @SenSchumer, did away with the Diversity Visa Program as part of broader reforms. I know, I was there," Flake tweeted.

Actually, the Gang of 8, including @SenSchumer, did away with the Diversity Visa Program as part of broader reforms. I know, I was there https://t.co/QQFJzPyRzC — Jeff Flake (@JeffFlake) November 1, 2017

That bill passed the Senate, 68-32, but it died when members who support low levels of immigration, predominantly Republicans, prevented any action in the GOP-controlled House.

Our ruling

Trump said the diversity visa lottery program is "a Chuck Schumer beauty."

Schumer did introduce legislation, 27 years ago, that included initial language establishing the diversity visa lottery. However, Schumer was hardly the only politician with a role in its passage.

The bill was signed by a Republican president, and the final version of the legislation received majority Republican support in both chambers of Congress, In fact, McConnell and several other Republicans still in office voted for the bill. Moreover, Trump’s tweet ignores that Schumer, just four years ago, worked to pass a bill that would have ended the lottery, but it died due to Republican opposition in the House.

We rate the statement Mostly False.