President Trump lashed out at Democratic Sen. Chuck Schumer and a lottery visa program that the terrorist who plowed into pedestrians in lower Manhattan reportedly used to enter the United States.

“The terrorist came into our country through what is called the ‘Diversity Visa Lottery Program,’ a Chuck Schumer beauty. I want merit based,” he posted on Twitter Wednesday morning. “We are fighting hard for Merit Based immigration, no more Democrat Lottery Systems. We must get MUCH tougher (and smarter). @foxandfriends.”

Trump’s tweets come after ABC7 reported that Sayfullo Saipov, who killed eight people before being shot and captured by the NYPD, was allowed into the US from Uzbekistan using the diversity visa lottery program.

Moments later, Trump again tweeted about a former military officer on a Fox News show talking about the program.

“Senator Chuck Schumer helping to import Europes problems,” said Col.Tony Shaffer. “We will stop this craziness! @foxandfriends,” the president wrote.

In a statement, Schumer slammed Trump for politicizing the issue and sowing division as the nation rallies after the terror attack just blocks away from the site of the Sept. 11 attacks.

“I have always believed and continue to believe that immigration is good for America. 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 said in the statement. “I’m calling on the president to immediately rescind his proposed cuts to this vital anti-terrorism funding.”

Trump has come out before in favor of scrapping the lottery visa system in favor of a merit-based admission process.

The program makes available up to 50,000 visas each year to people “drawn from random selection among all entries to individuals who are from countries with low rates of immigration” to the US, the US Citizen and Immigration Services website says.

Schumer was a sponsor of the legislation in 1990.