PRESIDENT Donald Trump has urged tougher immigration measures based on “merit” after the deadly vehicle attack in New York City, saying it was time to “stop this craziness”.

Mr Trump said on Twitter that the driver in Tuesday’s attack “came into our country through what is called the ‘Diversity Visa Lottery Program’, a Chuck Schumer beauty”, a reference to the Senate’s Democratic leader.

Officials said the attacker is an immigrant from Uzbekistan who came to the United States legally in 2010.

They have not said whether he was admitted through the diversity immigrant visa program, which covers immigrants from countries with low rates of immigration to the US.

Trump also tweeted on Wednesday: “We are fighting hard for merit based immigration, no more Democrat lottery systems.

“We must get much tougher (and smarter).”

Trump has backed legislation that would curb legal immigration and shift the nation toward a system that would place an emphasis on merit and skills over family ties.

The tweets followed Trump’s Tuesday night statement that he ordered the Department of Homeland Security “to step up our already extreme vetting program”.

Trump’s policy entails more stringent investigative measures intended to identify would-be immigrants who may sympathise with extremists or pose a national security risk to the United States. The White House did not immediately respond to questions about the president’s tweets.

Trump cited Fox And Friends on Twitter as he attacked Schumer and the programme. Trump added: “We will stop this craziness.”

The diversity visa programme provides up to 50,000 visas annually by lottery.

Applicants must have a high school diploma or meet work experience requirements. It was created as part of a bipartisan immigration bill introduced by the late senator Ted Kennedy and signed into law by President George HW Bush in 1990.