A law enforcement officer walks by the crime scene in New York on Wednesday. (Mark Lennihan/AP)

From Romania to Nepal, they call it the “golden ticket,” a diversity visa lottery that offers citizens of countries with low immigration rates a chance to come to the United States.

Among the winners are a family of software engineers from Bulgaria, a physician and his lawyer wife from Romania, and hundreds of thousands of others from around the world.

On Wednesday, the program became best known as the entrance portal for Sayfullo Saipov, a 29-year-old man from Uzbekistan who came to this country on a diversity visa seven years ago and is accused of mowing down pedestrians and cyclists on a Manhattan bike path this week.

President Trump — who along with some Republican lawmakers had previously called for ending the diversity visa lottery program — doubled down Wednesday, saying before a Cabinet meeting, "We need to get rid of the lottery program as soon as possible."

“We are fighting hard for Merit Based immigration, no more Democrat Lottery Systems,” the president tweeted.

Sayfullo Saipov, the suspect in the New York City truck attack. (Reuters)

Moments earlier, he took a jab at Senate Minority Leader Charles E. Schumer (D-N.Y.), who helped create the program in 1990.

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

The visa program, also known as the green-card lottery, issues up to 50,000 visas a year to people from dozens of countries, a tiny fraction of the roughly 1 million green cards the government issues annually. The aim is to mix up the nation’s melting pot.

The lottery is unusual because it does not require foreigners to obtain a sponsor — such as an employer or a relative — to come to the United States. Originally conceived as a way to help Irish citizens fleeing an economic crisis back home, the only requirement is that entrants be adults with a high school diploma or two years of recent work experience. Winners can bring their spouses and minor children. There is no application fee.

Millions apply each year, and fewer than 1 percent are randomly selected to undergo background checks. If they pass, they receive a green card, which grants them permanent residency in the United States and puts them on a path to citizenship. About 500,000 people have come to the United States through the program since 2007, according to the Pew Research Center.

Supporters say the lottery enhances the nation’s diversity, presents a welcoming face to the world and, overwhelmingly, brings law-abiding, productive residents to the United States. For immigrants, it can be a life-changing experience.

Africa and Eastern Europe account for two-thirds of the lottery winners in recent years. Citizens of countries that have sent at least 50,000 people to the United States in the past five years — such as Brazil, Canada, China and Mexico — cannot participate.

Livia and Adrian Lungulescu, a married couple in their 30s from Romania, came to this country on visas for his medical residency, applied for the lottery to stay permanently and won in 2009. Now they are both U.S. citizens. He treats patients from an office in New Hampshire and she represents immigrants in Boston.

“It helps the professionals and the high school graduates, not somebody that’s coming here to destroy America,” Livia Lungulescu said. “It’s something that helps people.”

Plamena Petrova came to the United States after her mother won a visa in the diversity lottery. (Family photo)

Plamena Petrova, a 31-year-old software engineer in Houston who works for Fitbit, the maker of wearable activity trackers, said her parents had a software business in Bulgaria before her mother won the visa lottery in 1999, when she was 12. Petrova went on to graduate from an Ivy League college and later worked for the Navy and a defense contractor. Her father is a software engineer at Boeing, working on the International Space Station at NASA.

“This country was built on immigrants,” Petrova said. “Diversity is part of the game. You need new ideas.”

The lottery, which has been managed by the State Department since it began operating in 1995, has raised concerns in the past, including in a 2007 Government Accountability Office report that said it was vulnerable to scams. The report also cited concerns from federal officials that the lottery allowed applicants from countries whose governments are sponsors of terrorism.

Egyptian Hesham Mohamed Ali Hedayet, who shot and killed two people at Los Angeles International Airport on July 4, 2002, came to the United States after his wife won the visa lottery. Mohamed Atta, another Egyptian and one of the Sept. 11, 2001, suicide pilots, applied for the lottery twice before entering the United States on a different visa to study aviation.

Winners undergo intense vetting, including criminal background checks and medical examinations. In the 2007 report, the GAO “found no documented evidence that DV immigrants from these, or other, countries posed a terrorist or other threat.”

Immigration legislation that passed the Senate but died in the House in 2013 would have ended the program in exchange for legal residency for millions of undocumented immigrants already in the United States. A bill proposed in August that would slash legal immigration levels in half over a decade also would eliminate the lottery program.

The fiscal 2019 visa lottery is currently taking applications, with a deadline of noon Eastern time Nov. 22. Winners are scheduled to be chosen in May.

Michael E. Miller contributed to this report.