Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Donald Trump said Wednesday that the Uzbek immigrant suspected of killing eight people in New York City with a rental truck entered the U.S. through the "Diversity Visa Lottery Program," and the president accused Sen. Chuck Schumer and other Democrats of having loosened the nation's borders.

Trump did not provide any supporting evidence for the claim about the visa program, which was being discussed on the morning TV program "Fox and Friends" that the president indicated in his tweets he was watching.

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

The terrorist came into our country through what is called the "Diversity Visa Lottery Program," a Chuck Schumer beauty. I want merit based. — Donald J. Trump (@realDonaldTrump) November 1, 2017

We are fighting hard for Merit Based immigration, no more Democrat Lottery Systems. We must get MUCH tougher (and smarter). @foxandfriends — Donald J. Trump (@realDonaldTrump) November 1, 2017

"We are fighting hard for Merit Based immigration, no more Democrat Lottery Systems. We must get MUCH tougher (and smarter) @foxandfriends," Trump tweeted, citing the program whose hosts were discussing the visa lottery.

"Senator Chuck Schumer helping to import Europes problems, said Col.Tony Shaffer. We will stop this craziness! @foxandfriends," Trump added, appearing to refer to a retired U.S. Army Reserve lieutenant colonel who appeared on the program Wednesday.

At a Cabinet meeting later, Trump said he would work with Congress to end the visa program.

"I am today starting the process of terminating the diversity lottery program. I am going to ask Congress to immediately...get rid of this program," said the president, who called the suspect an "animal." "Diversity lottery — sounds nice, it’s not nice. It's not good. It hasn't been good."

Trump continued, "We want people that are going to help our country, we want people that are going to keep our country safe. We don’t want lotteries where the wrong people are in the lotteries and guess what? Who are the suckers that get those people? We want a merit-based system."

A spokesman for the Department of Homeland Security later confirmed the suspect in the attack, a 29-year-old Uzbek immigrant named Sayfullo Saipov, had been admitted to the U.S. "upon presentation of a passport with a valid diversity immigrant visa to U.S. Customs and Border Protection in 2010."

After Trump's attacks on him, Schumer shot back on Twitter: "I guess it's not too soon to politicize a tragedy."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

I guess it's not too soon to politicize a tragedy. — Chuck Schumer (@SenSchumer) November 1, 2017

In a statement, the New York senator slammed Trump for "dividing America" and called on the president not to follow through on proposed cuts to "vital anti-terrorism funding."

"I have always believed and continue to believe that immigration is good for America," Schumer said. "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."

Schumer also took on Trump in a passionate speech from the Senate floor, asking, "President Trump, where is your leadership?"

The New York lawmaker drew a comparison between Trump's conduct after Tuesday's attack and the way former President George W. Bush responded to 9/11.

Bush "understood the meaning of his high office" in the midst of a national tragedy, Schumer said. "The contrast between President Bush's actions after 9/11 and President Trump's actions this morning couldn’t be starker."

The Trump-Schumer back and forth came less than 24 hours after eight people were killed and more than a dozen injured when a motorist in a rented pickup truck deliberately drove down a bike path in lower Manhattan and mowed down several people before crashing into a school bus in what officials said was a terror attack.

Police found a note inside the truck indicating the suspect claimed to have carried out the attack to show his support for ISIS.

Sayfullo Saipov. A man in a rented pickup truck mowed down pedestrians and cyclists along a busy bike path near the World Trade Center memorial on Oct. 31, 2017, killing several. St. Charles County Department of Corrections/KMOV via AP

According to The New York Times, he had obtained a green card, giving him permanent legal resident status in the U.S.

Trump, in his tweets Wednesday, was apparently referring to the Diversity Immigrant Visa lottery, which was established by the Immigration Act of 1990. That bill was passed with bipartisan support and signed into law by then-President George H.W. Bush.

The program allows the State Department to offer 50,000 visas annually to immigrants from countries with low immigration rates.

Meanwhile, Democrats and Republicans alike hit back against Trump.

Rep. Adam Schiff, D-Calif., the ranking Democrat on the House Intelligence Committee, said on "Morning Joe" that "it was kind of absurd (for Trump)...to be using it as a fulcrum for…this kind of a debate."

New York Gov. Andrew Cuomo, at a press conference later Wednesday, said Trump's tweets "were not factual" and "were not helpful."

"You play into the hands of the terrorists," Cuomo, a Democrat, said when asked for his thoughts on the tweets. "The tone now should be the exact opposite on all levels."

Sens. Bob Corker, R-Tenn., and Jeff Flake, R-Ariz., who have both become vocal Trump critics since announcing they would not run for reelection next year, also took on the president.

"I don't think that brings out the best in our country," Corker told NBC News, while Flake called Trump's response "premature."

"He should express solidarity with those trying to fix this (visa) program," Flake said.

Another Republican defended the diversity visa lottery.

"To be honest with you, I’ve known a number of people in New York who come in under the lottery system — they’ve made outstanding contributions, they’ve become citizens," Rep. Peter King, R-N.Y., a former House Homeland Security Committee chairman, told the Fox Business Network. "So that really is separate from the idea of the vetting."

According to the State Department, diversity visa lottery applicants must meet certain education and work experience requirements, including having obtained "at least a high school education or its equivalent" or "two years of work experience within the past five years in an occupation that requires at least two years of training or experience to perform."

The State Department determines those accepted under the program through a randomized computer drawing, its website states.

In 2013, a bipartisan group of senators, including Schumer, known as the "Gang of Eight" proposed a compromise immigration reform bill that would have eliminated the diversity lottery. The bill did not make it through Congress.