WASHINGTON, DC - SEPTEMBER 06:  U.S. Senate Minority Leader Chuck Schumer (D-NY) (L) makes a point to President Donald Trump in the Oval Office prior to his departure from the White House September 6, 2017 in Washington, DC. President Trump is traveling to North Dakota for a tax reform event with workers from the energy sector.  (Photo by Alex Wong/Getty Images)
WASHINGTON, DC - SEPTEMBER 06: U.S. Senate Minority Leader Chuck Schumer (D-NY) (L) makes a point to President Donald Trump in the Oval Office prior to his departure from the White House September 6, 2017 in Washington, DC. President Trump is traveling to North Dakota for a tax reform event with workers from the energy sector. (Photo by Alex Wong/Getty Images)
PHOTO: Alex Wong/Getty Images
Now playing
01:50
How the diversity visa lottery came to be
The Home Depot truck used in the bike path attack is removed from the crime scene, Wednesday, Nov. 1, 2017, in New York. (AP Photo/Mark Lennihan)
The Home Depot truck used in the bike path attack is removed from the crime scene, Wednesday, Nov. 1, 2017, in New York. (AP Photo/Mark Lennihan)
PHOTO: Mark Lennihan/AP
Now playing
02:04
NYPD: Attack suspect followed ISIS playbook
Now playing
00:48
Victims in New York attack identified
A New York Police Department officer stands next to a body covered under a white sheet near a mangled bike along a bike path Tuesday Oct. 31, 2017, in New York. (AP Photo/Bebeto Matthews)
A New York Police Department officer stands next to a body covered under a white sheet near a mangled bike along a bike path Tuesday Oct. 31, 2017, in New York. (AP Photo/Bebeto Matthews)
PHOTO: Bebeto Matthews/AP
Now playing
01:14
Video shows horror of New York attack
NYC school bus attack
NYC school bus attack
PHOTO: Twitter/Sebastian Sobczak
Now playing
01:10
Video shows kids trapped in bus after attack
PHOTO: Tawhid Kabir Xisan/Snapchat
Now playing
00:30
Video appears to show suspect after truck attack
PHOTO: CNN
Now playing
01:49
Cuomo: Terror suspect radicalized domestically
NEW YORK, NY - OCTOBER 31: NYPD officers respond after reports of multiple people hit by a truck after it plowed through a bike path in lower Manhattan on October 31, 2017 in New York City. According to reports up to six people may have been killed. (Photo by Kena Betancur/Getty Images)
NEW YORK, NY - OCTOBER 31: NYPD officers respond after reports of multiple people hit by a truck after it plowed through a bike path in lower Manhattan on October 31, 2017 in New York City. According to reports up to six people may have been killed. (Photo by Kena Betancur/Getty Images)
PHOTO: Kena Betancur/Getty Images
Now playing
01:09
New York witness: Bodies had tire tracks
PHOTO: Sruli/Twitter
Now playing
00:40
Video shows bike path after NYC truck incident
Now playing
00:57
NYPD commissioner: This is not about Islam
Now playing
01:03
Gov. Cuomo: Our spirit is stronger than theirs
Now playing
01:16
NYC mayor on attack: Cowardly act of terror
PHOTO: Reuters
Now playing
01:34
NYC residents resilient after truck attack
Investigators inspect a truck following a shooting incident in New York on October 31, 2017. 
Several people were killed and numerous others injured in New York on Tuesday when a suspect plowed a vehicle into a bike and pedestrian path in Lower Manhattan, and struck another vehicle on Halloween, police said. A suspect exited the vehicle holding up fake guns, before being shot by police and taken into custody, officers said. The motive was not immediately apparent.

 / AFP PHOTO / Don EMMERT        (Photo credit should read DON EMMERT/AFP/Getty Images)
Investigators inspect a truck following a shooting incident in New York on October 31, 2017. Several people were killed and numerous others injured in New York on Tuesday when a suspect plowed a vehicle into a bike and pedestrian path in Lower Manhattan, and struck another vehicle on Halloween, police said. A suspect exited the vehicle holding up fake guns, before being shot by police and taken into custody, officers said. The motive was not immediately apparent. / AFP PHOTO / Don EMMERT (Photo credit should read DON EMMERT/AFP/Getty Images)
PHOTO: DON EMMERT/AFP/Getty Images
Now playing
02:06
Vehicles as weapons: A disturbing trend
NEW YORK, NY - OCTOBER 31: NYPD officers respond after reports of multiple people hit by a truck after it plowed through a bike path in lower Manhattan on October 31, 2017 in New York City. According to reports up to six people may have been killed. (Photo by Kena Betancur/Getty Images)
NEW YORK, NY - OCTOBER 31: NYPD officers respond after reports of multiple people hit by a truck after it plowed through a bike path in lower Manhattan on October 31, 2017 in New York City. According to reports up to six people may have been killed. (Photo by Kena Betancur/Getty Images)
PHOTO: Kena Betancur/Getty Images
Now playing
00:35
Witnesses: Driver yelled 'Allahu Akbar'
PHOTO: WPIX
Now playing
01:35
NYPD: Truck drove wrong way on bike path

Story highlights

The program benefits up to 50,000 people per year from countries with lower levels of immigration to the US

The lottery has been controversial for years

(CNN) —  

President Donald Trump on Wednesday tweeted that the 29-year-old Uzbek national suspected of killing eight people in a suspected terrorist attack in New York City the day before is a recipient of a “diversity visa,” reigniting a long-simmering debate about immigration in the US.

Lesser known than traditional ways of immigrating into the country like family or work ties, the program benefits up to 50,000 people per year from countries with lower levels of immigration to the US.

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

Minutes later, he added: “We are fighting hard for Merit Based immigration, no more Democrat Lottery Systems. We must get MUCH tougher (and smarter).”

What is it?

The Diversity Immigrant Visa Program awards up to 50,000 individuals per year a visa for a green card, which bestows permanent residency in the US and is a path to citizenship.

Opponents of immigration complain that the program brings people to the US to compete for jobs, and even supporters of immigration acknowledge the program does not tailor applicants to needs in the US.

Visas are awarded by random selection in select countries to promote immigration from places that don’t otherwise send many immigrants to the US.

How does it work?

Roughly 1 million green cards are issued by the US per year. In 2016, 45,664 diversity visas were issued. The vast majority of green cards are based on family connections, and other categories include employment-based visas and refugees or asylees.

Individuals in countries that are determined by a formula to have a low enough level of immigration to the US can apply for the visas at certain times each year. Most of the lottery recipients live outside the US, but a few are in the US legally on other visas.

According to the formula set out by law, countries that have had more than 50,000 natives immigrate to the US in the previous five years are ineligible.

The visas are distributed further by regions: Africa, Asia, Europe, North America (other than Mexico), Oceania and South America, Mexico, Central America and the Caribbean.

The program is run by the State Department.

While individuals are selected for visas randomly, they still must meet security and eligibility requirements that all immigrants must clear to actually get their visas.

Diversity recipients specifically must also have at least a high school education or equivalent and must have had at least two years of experience working a job that requires at least two years of training or experience within five years of the date of the application. They must also be admissible to the US – categories of inadmissibility to the US broadly include terrorism connections.

The process also includes an in-person interview.

“In order to immigrate, DV selectees must be admissible to the United States,” a State Department information handout for applicants states. “The DS-260, Online Immigrant Visa and Alien Registration Application, electronically, and the consular officer, in person, will ask you questions about your eligibility to immigrate under U.S. law. These questions include criminal and security related topics. “

How did it get started?

The program was established in a bill passed in 1990, the Immigration Act. Senate Minority Leader Chuck Schumer – then a New York congressman – was one of 31 co-sponsors of the House version of the bill, spearheaded by Rep. Bruce Morrison, a Connecticut Democrat.

Schumer was credited with the concept of giving visas to countries with low admission rates to the US, which he developed in a different bill that he sponsored that was rolled into the broader law.

Morrison also promoted the bill as a way to legalize Irish immigrants, according to a 1990 report in The New York Times and an analysis of the development of the program from the group NumbersUSA, which advocates for sharp cuts in overall immigration.

The final bill passed the Senate 89-8 and the House 264-118.

Has Congress tried to change the program?

In 2013, Schumer helped author the Gang of Eight bill that passed the Senate by a wide margin, which would have replaced the program.

The Gang of Eight measure was the result of a bipartisan effort to secure comprehensive immigration reform and had included senators such as Florida Republican Marco Rubio and South Carolina Republican Lindsey Graham. The bill died in the House.

The bill would have moved the diversity visas elsewhere in the system and introduced a merit system that took into account multiple factors like family and work skills.

“Actually, the Gang of 8, including @SenSchumer, did away with the Diversity Visa Program as part of broader reforms. I know, I was there,” tweeted Arizona Republican Sen. Jeff Flake on Wednesday in response to Trump.

“When re-evaluating immigration policy, it is right to give priority, through a point system or otherwise, to those who have skills and abilities unique to the new economy,” Flake wrote in a recent op-ed. “We did this in 2013, in the bipartisan immigration bill that passed the Senate. But there must always be a place in America for those whose only initial credentials are a strong back and an eagerness to use it.”

What is Trump proposing?

Republican Sens. Tom Cotton and David Perdue have introduced a bill, endorsed by Trump, that would eliminate the diversity lottery and certain categories of family-based green cards, and then would transform the remaining employment-based visas into a point system that favors heavily highly skilled, highly educated, English-speaking immigrants.

But while there is consensus around needing to reform the process, limited support exists even within the GOP for Cotton and Perdue’s bill.

The Cotton-Perdue bill would roughly halve the number of green cards overall per year, a point of contention for many Democrats and Republicans alike, and wouldn’t easily allow for low skilled immigrants to come to the US permanently, another sticking point for many.

CNN’s Dan Merica contributed to this report.