At least five foreign nationals with suspected ties to terror resettled in the U.S. through the same visa lottery program that allowed NYC terror suspect Sayfullo Saipov into the country, the Trump administration said Tuesday.

Saipov, the ISIS sympathizer who allegedly committed the Halloween terror attack in Lower Manhattan that left eight dead and 11 more injured, entered the U.S. from Uzbekistan in 2010 through the visa lottery program.

The visa "lottery," also known as the Diversity Visa Waiver Program, grants up to 50,000 immigrant visas annually, “drawn from random selection among all entries to individuals who are from countries with low rates of immigration” to the U.S., according to U.S. Citizen and Immigration Services.

“A merit-based system, by definition, would be safer than a lottery or even extended family-based immigration." — Attorney General Jeff Sessions

That random selection, according to the State Department, is through a computer-generated drawing for foreign nationals to apply for permanent residence, or a green card, in the U.S. each year.

The Trump administration has identified several other terror suspects who have been randomly selected through the visa lottery to permanently settle in the U.S.

30,000 VISAS ISSUED TO PEOPLE FROM TERROR-SPONSORING COUNTRIES SINCE 2007: STATE DEPARTMENT

According to the Justice Department, on Oct. 27, just days before Saipov’s attack in New York City, another Uzbek national and visa lottery winner, Abdurasul Hasanovich Juraboev, was sentenced to 15 years in prison after pleading guilty to conspiring to provide material support to the Islamic State.

Another visa lottery winner, Syed Haris Ahmed, a Pakistani national, was convicted of terrorism related activities in the U.S. and abroad in 2009.

President Trump has been vocal in criticizing the program, and had called for its elimination, along with the termination of chain migration, which happens when immigrants can enter the country, simply to be united with a relative already living in the U.S.

In the summer of 2002, Egyptian national Hesham Mohamed Ali Hedayet opened fire at the El Al Airlines ticket counter at Los Angeles International Airport, murdering two ticket agents and wounded three others. Hedayet, at the time, had lived in the U.S. for 10 years, but was only able to claim “lawful permanent resident status” when his wife was randomly selected as a Visa Lottery winner in 1997, according to the Trump administration.

Also in the summer of 2002, Pakistani national Imran Mandhai pled guilty to conspiring to bomb a National Guard Armory and electrical power substation near Miami, Florida. Mandhai entered the U.S. due to his parent’s random selection for permanent legal status after winning the visa lottery program.

The Trump administration also pointed to a case in 1997, of Mousa Mohammed Abu Marzook, a U.S. Hamas leader, who was deported for terrorist activities. According to the Trump administration, Marzook obtained a Green Card through the program that existed prior to the passage of the Diversity Visa Waiver Program.

The program originated as part of a bill introduced in 1990 by Senate Minority Leader Chuck Schumer, D-N.Y., then a member of the House. Schumer’s measure to make a set number of visas available to “diversity immigrants” from certain countries was absorbed into a larger House immigration bill, which was sponsored by Schumer and 31 others, including several Republicans.

That bill was ultimately passed in a bipartisan vote, and was signed by President George H.W. Bush.

According to the State Department, in 2004, the agency’s deputy inspector general warned that the program contained “significant threats to national security as hostile intelligence officers, criminals, and terrorists attempt to use it” to enter the U.S.

More than a decade later, Attorney General Jeff Sessions is making the same warning.

“A merit-based system, by definition, would be safer than a lottery or even extended family-based immigration,” Sessions said in a speech in New York City earlier this month, saying “we don’t use random chance in college admissions and we don’t roll a die to hire people,” and called for a “rational” system.

Even Congressional Republicans, including those who are not typically in lockstep with the president, have rallied around his call for “extreme vetting” and the repeal, or reform of the program in the wake of the New York City terror attack.

Sen. Lindsey Graham, R-S.C., said the attack underscored the need for “merit-based immigration,” and said “it makes no sense” to hand out visas and green cards in a random way.

Other Republican lawmakers also called for policy reforms, including Sen. John McCain, R-Ariz., who said the program should be scrapped and replaced with a merit-based immigration system, in a rare moment of agreement between Trump and the senator.

And Sens. David Perdue, R-Ga., and Tom Cotton, R-Ark., proposed eliminating the Diversity Visa Lottery Program as part of the RAISE Act.

“While Senate Democrats originally created the Diversity Visa Lottery in 1990, many have supported legislation that would have eliminated it in the years since,” Perdue said in a statement. “I hope we can include this area of common ground as we work to fix our broken immigration system and strengthen our national security.”

The Trump White House came out in support of the bill, calling the DV program “outdated,” adding that it “serves questionable economic and humanitarian interests.”