Sen. Charles E. Schumer (D-N.Y.) calls on a reporter during a news conference Wednesday. (Andrew Harnik/AP)

President Trump and some of his allies on the far right have found a new culprit in Tuesday’s deadly terrorist attack in Manhattan: Senate Minority Leader Charles E. Schumer (D-N.Y.).

As details emerged about the incident, prominent right-wing commentators and news outlets seized on a report from New York’s ABC affiliate that the alleged attacker, Sayfullo Saipov, had come to the United States from Uzbekistan under a State Department program known as the Diversity Visa Lottery.

Long before government officials publicly confirmed the ABC report, Trump slammed the visa lottery and said he’ll ask Congress “to immediately initiate work to get rid of this program.”

“I am today starting the process of terminating the diversity lottery program,” Trump told reporters before a midday Cabinet meeting, adding: “It sounds nice. It’s not nice. It’s not good.”

The president on Wednesday also criticized Schumer, who in 1990 introduced the House bill that helped create the visa program.

Years later, in 2013, the New York Democrat was among a bipartisan group of lawmakers who sought to end the program. But he is still being assailed by Trump and other conservatives.

Despite criticism, a federal program that awards U.S. permanent residency to foreigners through a lottery has been around for more than 20 years. This is how the Diversity Visa Lottery, also known as the green card lottery, works. (Claritza Jimenez/The Washington Post)

The Department of Homeland Security confirmed on Wednesday afternoon “that the individual identified in the New York City terror attack was admitted to the U.S. upon presentation of a passport with a valid diversity immigrant visa.” A DHS spokesman, who did not mention Saipov by name, said the suspect entered the United States in 2010.

In news interviews, blog posts and tweets, conservatives blamed the Democrat, saying he was responsible for allowing the 29-year-old man’s entry into the country.

Trump joined the criticism early Wednesday, hours before declaring that he would ask Congress to terminate the program.

Schumer, in response to Trump’s tweets, said, “I guess it’s not too soon to politicize a tragedy.”

In 2013, Schumer was part of the Senate’s “Gang of Eight” group that came up with a sweeping bipartisan proposal to revamp U.S. immigration laws. Among other things, that proposal called for eliminating the diversity lottery.

Sen. Jeff Flake (R-Ariz.), another member of the Gang of Eight, defended Schumer, recalling that the group had tried to end the program.

The bill passed the Senate but died in the House.

In a statement, and later at the Capitol, Schumer criticized Trump for proposed budget cuts to counterterrorism programs.

“I have always believed and continue to believe that immigration is good for America,” his statement read. “President Trump, instead of politicizing and dividing America, which he always seems to do at times of national tragedy, should be focusing on the real solution — anti-terrorism funding — which he proposed cutting in his most recent budget.

“I’m calling on the President to immediately rescind his proposed cuts to this vital anti-terrorism funding.”

Doing so, Schumer said, would help the New York Police Department and other law enforcement agencies across the country.

Senators on both sides of the aisle react to the Oct. 31 truck attack in New York, and President Trump's subsequent tweets. (Jordan Frasier/The Washington Post)

The midyear budget proposal from Trump called for cutting more than half a billion dollars from “critical counterterrorism programs” administered by the DHS, according to a congressional report.

That report, released in July, said the proposed budget would increase DHS funding by 7 percent while “numerous critical programs that mitigate terror threats are cut dramatically,” including programs aimed at targeting violent extremism, responding to terrorist attacks and patrolling U.S. airports.

The report was written by the Democratic staff of the Senate Committee on Homeland Security and Governmental Affairs at the request of Sen. Claire McCaskill (D-Mo.), the ranking Democrat on the committee.

Many conservatives blame terrorism and violent crime on the nation’s immigration laws. It’s how Trump has justified his travel ban, which has met with resistance from the courts.

After a labor policy event at the Capitol, Schumer declared, “The terrorists can’t divide us.”

He declined to discuss the specifics of the diversity lottery program at the time because some details, including how the suspect entered the United States, were still unclear. Schumer said that he did not speak with Trump after Tuesday’s attack and that he was offered “nothing” — no briefing by the White House on the situation.

Instead, he had to call the deputy director of the FBI on Tuesday to get updates.

The diversity visa program has been a target of many conservatives for years, with Trump supporting legislation to eliminate it in favor of a “merit-based” immigration system. The New York attack suspect’s ties to the diversity visa lottery provided an opportunity to push that immigration-law agenda and bash Schumer.

It also appeared to play well on the Internet with some Trump boosters who recoil at the word “diversity” as part of a politically correct liberal lexicon.

“I’m sick and tired of seeing men, women and children being sacrificed to the liberals’ false deity of diversity, while we all get invaded,” said one Twitter user, echoing a theme that coursed through the Internet overnight.

The diversity visa program has been around for more than 20 years, offering a limited number of visas to people from parts of the world that have relatively few immigrants in the United States.

Schumer did play a key role in drawing up the program in 1990. His proposals eventually became part of a broader immigration package that was passed by Congress in a bipartisan vote and signed into law by a Republican president, George H.W Bush.

For Sebastian Gorka, a former aide to Trump known for his anti-immigration views, that was enough to connect the minority leader to Saipov, who is accused of plowing a truck into people on a bike path, killing eight.

Speaking with Sean Hannity on Fox News, conservative radio host Mark Levin gave a similar assessment.

“You know who the sponsor was? Chuck Schumer,” he said, to which Hannity responded, “Good grief.”

“This diversity visa program should be gutted,” Levin said. “The purpose of immigration, historically, is to improve the United States, is to benefit the United States, not to ensure diversity from the foreigners coming into this country, not to ensure that certain countries are well represented.”

Breitbart wrote that Schumer had “created” the program, and it referred to the visas as “Schumer visas.”

“One of the Schumer-visa winners was Sayfulloh Saipov,” read Breitbart’s article.

By early Wednesday, “Diversity Visa” was trending on Twitter. Some users shared graphic illustrations of a pair of hands with blood dripping from them. “You have blood on your hands Chuck,” one tweet read.

Congress approved the Diversity Visa Lottery, also known as the green-card lottery, as part of the Immigration Act of 1990, but it didn’t take effect until 1995.

Under the program, the State Department offers 50,000 visas each year to immigrants from parts of the world with relatively low immigration rates over the previous five years. Most visas go to people from African nations, as The Washington Post has reported.

To qualify, applicants must have a high school education or two years in an occupation that requires formal training. Those who meet eligibility requirements are selected at random from a computer lottery. The State Department refers to them as “diversity immigrants.”

The program did originate in part in a bill introduced in 1990 by Schumer, who was then a member of the House. He proposed making a set number of visas available each year to “diversity immigrants” from “low-admission” countries.

Schumer’s measure was absorbed into a broader House immigration bill, which was sponsored by Schumer and 31 others, including several Republicans. The legislation passed in a bipartisan vote of 231 to 192. The Senate version, which contained the “diversity immigrants” provision, passed in an overwhelming 89-to-8 vote and was signed into law by Bush at the end of 1990.

For the past decade or so, political leaders have debated whether to keep issuing diversity visas.

A Congressional Research Service report from 2011 noted that some lawmakers and government officials had raised concerns about the program, suggesting that there were national security reasons to eliminate it. The report mentioned one case in which an Egyptian immigrant whose spouse was a diversity immigrant fatally shot two people at Los Angeles International Airport. It also cited disagreement over the reliability of background checks in countries that qualified at the time for the diversity lottery.

The Government Accountability Office reviewed the program in 2007 and found no documented evidence that diversity immigrants posed a terrorist threat, but it concluded that the program was vulnerable to fraud. The State Department under President George W. Bush rejected the agency’s recommendations, contending that its fraud-screening program was robust.

Trump said earlier this year that he supported legislation to eliminate diversity visas. The Reforming American Immigration for Strong Employment (Raise) Act in the Senate would scrap the program and introduce a “merit-based” immigration system prioritizing foreigners with job skills, English abilities and higher education.

Black lawmakers and civil rights advocates have argued against ending diversity visas, as the Hill has reported. Doing so, they say, would take away an important pathway for African and Caribbean immigrants to lawfully enter the United States.

The Uzbek immigrant community in the United States is small, numbering in the tens of thousands, and few Uzbek immigrants enter the country each year, making Uzbekistan a prime candidate for the diversity visa program. The U.S. Embassy in Uzbekistan advertises diversity visas on its website. By comparison, nearly 170,000 people immigrated to the United States from India in 2015, along with 143,200 from China and 139,400 from Mexico, according to figures from the Migration Policy Institute. As a result, those countries do not qualify for diversity visas.

At the Capitol on Wednesday, Schumer blasted Trump’s response to the attack.

“This is a tragedy,” Schumer said. “It’s less than a day after it occurred, and he can’t refrain from his nasty, divisive habits. He ought to lead.”

The Democrat said he hoped his most recent spat with the president wouldn’t affect attempts to resolve disputes over how to address the legal status of hundreds of thousands of young “dreamers,” or undocumented immigrants who were brought into the country as children.

“I have always believed in immigration as good for America — so do the vast majority of Americans. I stand by that today,” Schumer said. “It’s a good thing for America. Whether President Trump believes that or not, we don’t know, because some days he’s very anti-immigrant, and then he calls Leader Pelosi and I to the White House and says, ‘Let’s help the dreamers.’ ”

Schumer said he last spoke with the president “two or three weeks ago.”

Ed O’Keefe and Mark Berman contributed to this post, which has been updated.

A man deliberately drove a vehicle onto a bike path in Lower Manhattan on Oct. 31, killing at least eight people and injuring 11. Here is what we know. (Melissa Macaya/The Washington Post)