A man charged with joining the Islamic State (ISIS) as a sniper and firearms instructor originally came to the United States through the “Diversity Visa Lottery,” a program responsible for bringing more than half a million randomly chosen foreign nationals to the country in a single decade.

Ruslan Maratovich Asainov, 42-years-old, was charged last week in a Brooklyn, New York, federal court for aiding ISIS in 2013 when he allegedly traveled to Turkey and Syria to fight for the terrorist group.

Asainov, the United States Citizenship and Immigration Services (USCIS) agency has confirmed, first arrived in the U.S. through the Diversity Visa Lottery in February 1999.

The Visa Lottery randomly gives out about 55,000 visas every year to foreign nationals from a multitude of countries, including those with known terrorist problems — such as Afghanistan, Algeria, Egypt, Iraq, Lebanon, Libya, Nigeria, Saudi Arabia, Somalia, Syria, Yemen, and Uzbekistan.

Requirements for foreign nationals to win the visa lottery are low, with the foreign national only needing a high school degree and two years of work experience. Despite the weak prerequisites needed to obtain the visa, foreign nationals can later obtain green cards to permanently stay in the U.S. and after living in the country for five years can become American citizens and begin bringing their extended relatives to the country, a system known as “chain migration.”

Asainov, in September 2006, was allowed to become a naturalized U.S. citizen.

The alleged ISIS sniper is just the latest foreign national that has successfully entered the country through the legal immigration system, and specifically the Visa Lottery. In 2017, Uzbek national Sayfullo Saipov allegedly murdered eight people after mowing them down with his car in the Tribeca neighborhood in New York City.

Saipov, like Asainov, came to the U.S. through the Visa Lottery in 2010 before the federal government granted him a green card to permanently stay in the country.

Uzbek national Sayfullo Saipov entered US on Diversity Visa

Trump has repeatedly demanded the visa be ended https://t.co/UX2cU9rTPc — John Binder 👽 (@JxhnBinder) November 1, 2017

Since 2005, Breitbart News reported, more than half a million foreign nationals have come to the U.S. by randomly winning the Visa Lottery, bringing with them a chain migration of five million foreign nationals since 1994, according to researchers at the Center for Immigration Studies.

Over the last half-decade between 2012 and 2016, as Breitbart News reported, 72,794 foreign nationals have come to the U.S. on the Visa Lottery from countries that the Immigration and Customs Enforcement (ICE) agency has designated as terrorist-sponsors.

In 2016 alone, more than 15,600 foreign nationals entered the U.S. from terrorist-sponsored countries through the Visa Lottery. Those countries included Iran, Iraq, Saudi Arabia, Afghanistan, Somalia, Syria, Sudan, and Algeria.

John Binder is a reporter for Breitbart News. Follow him on Twitter at @JxhnBinder.