Sayfullo Saipov, 29, came to the United States legally in 2010 from Uzbekistan through the diversity immigration lottery visa program, a system that Trump has asked Congress to end in the wake of the attack.
Each year, the State Department randomly selects roughly 50,000 applicants to be awarded green cards. Most of the recipients in 2016 were from Africa and Europe, though that year the country with the most successful applicants were from Nepal.
The program's goal is to admit more immigrants from "countries with historically low rates of immigration to the United States," according to the State Department.
The system requires applicants to have a high school education or equivalent, as well as two years of qualifying work experience. It also requires them to meet the same vetting standards as any other immigration program.
Trump has made cracking down on undocumented immigration and terror threats a cornerstone of his national security agenda as President and during his campaign for the White House.
But where do recipients of the diversity lottery visa come from, and how have the numbers changed in the last decade?
The top receiving country under the program is Nepal with 3,247 visas, followed by Egypt with 2,855, Iran and the Democratic Republic of the Congo with 2,778 each, Uzbekistan with 2,378 and Ethiopia with 2,143, according to 2016 data
The roughly 50,000 total visas were doled out to people from about 100 countries in 2016.
Africans account for a plurality of immigrants in the system, making up 44% of people given green cards. Europeans make up 33%. This is in line with most splits over the last decade, but the two continents were evenly split with 40% each in 2015.
Immigrants from Asia have stayed mostly steady over the last decade at just more than one in six immigrants in the program, while people from Oceania as well as South and Central America make up just a small fraction of total immigrants in the program.
No one country is allowed to receive more than 7% of the available visas, according to the State Department, putting the maximum cap around 3,500 people per country.
The number of recipients from Uzbekistan -- the home country of the accused New York attacker -- climbed from 958 in 2006 to 3,596 in 2011. It slipped slightly to 2,378 recipients in the most recent data in 2016. Other countries like Sudan, Venezuela, Liberia, Iran, Moldova and the Democratic Republic of the Congo have climbed exponentially over the last decade.
Some countries have seen dramatic declines in the number of immigrants in the program. Nigeria, Bangladesh and Peru used to be significant contributors of diversity visa recipients, but have become ineligible because they send more immigrants through other programs. Still, immigrants from Ukraine, Ghana, Morocco and Kenya through the program have been more than cut in half over the last decade, according to data from the State Department.