Donald Trump has declared he wants to immediately work with Congress to terminate the diversity immigration lottery programme, which he says is how the 'animal' New York terror suspect got into the US.

“We need to get rid of the lottery program as soon as possible,” Mr Trump told reporters. “We’re going to quickly as possible get rid of chain migration and move to a merit programme.”

Similar to how he responded to previous major terror attacks in the US and abroad, the President has vowed to toughen immigration restrictions after a truck driver rammed into bicyclists and pedestrians on a bike path in Manhattan, killing eight people.

Mr Trump has also assailed Senator Chuck Schumer, the top Democrat in the Senate, who in 1990 introduced the bill in the House of Representatives that helped create the Diversity Immigrant Visa Program – despite the fact that Mr Schumer was among a bipartisan group of lawmakers in 2013 who sought to end it.

“The terrorist came into our country through what is called the 'Diversity Visa Lottery Program,' a Chuck Schumer beauty,” the President tweeted earlier on Wednesday.

A 29-year-old Uzbek national with Isis associations is suspected to have carried out the attack. The US Department of Homeland Security later confirmed that he was admitted to the US in 2010 with a diversity immigrant visa.

The programme awards up to 50,000 visas per year to people from parts of the world that have relatively few immigrants in the US.

New York Truck attack Show all 6 1 /6 New York Truck attack New York Truck attack Investigators inspect the truck following the attack Investigators inspect a truck following a shooting incident in New York on 31 October 2017. Several people were killed and numerous others injured in New York on Tuesday when a suspect plowed a vehicle into a bike and pedestrian path in Lower Manhattan, and struck another vehicle on Halloween, police said. A suspect exited the vehicle holding up fake guns, before being shot by police and taken into custody, officers said. The motive was not immediately apparent. Getty New York Truck attack A paramedic looks at a body along the bike path A paramedic looks at a body covered under a white sheet along the bike path 31 October 2017, in New York. A motorist drove onto a busy bicycle path near the World Trade Center memorial and struck several people Tuesday, police and witnesses said. AP Photo/Bebeto Matthews New York Truck attack The truck driver collided with a school bus Authorities respond near a damaged school bus Tuesday, 31 October 2017, in New York. A motorist drove onto a busy bicycle path near the World Trade Center memorial and struck several people, police and witnesses said. Two adults and two children were on the bus at the time. AP Photo/Bebeto Matthews New York Truck attack A young girl reacts to the scene A young girl reacts as police officers secure an area following a shooting incident in New York on 31 October 2017. Several people were killed and numerous others injured in New York on Tuesday after a vehicle plowed into a pedestrian and bike path in Lower Manhattan, police said. 'The vehicle struck multiple people on the path,' police tweeted. 'The vehicle continued south striking another vehicle. The suspect exited the vehicle displaying imitation firearms & was shot by NYPD.' DON EMMERT/AFP/Getty Images New York Truck attack Police officers arrive at the scene Police officers arrive at the scene following a shooting incident in New York on 31 October 2017. Multiple people were hurt in downtown Manhattan, US media reported after police confirmed that they were responding to reports of a shooting. Police said they had mobilized to the scene in Lower Manhattan and that one person was in custody, giving no further details. DON EMMERT/AFP/Getty Images New York Truck attack Emergency personnel respond to truck attack in lower Manhattan Emergency personal respond after reports of multiple people hit by a truck after it plowed through a bike path in lower Manhattan on 31 October 2017 in New York City. According to reports up to six people may have been killed. Kena Betancur/Getty Images

More than 45,500 diversity visas were issued in 2016.

In 1990, when Mr Schumer was part of the House, he proposed making a set number of visas available each year to “diversity immigrants” from “low-admission” countries.

The New York Democrat's measure was absorbed into a broader House immigration bill, which was sponsored by him and 31 other members of Congress, including several Republicans. The legislation received bipartisan support in both the House and Senate, and was signed into law by Republican President George HW Bush.

In 2007, the US Government Accountability Office reviewed the programme and found no documented evidence that diversity immigrants posed a terrorist threat. But legislators have continued to say there are national security reasons for eliminating the programme.

Mr Schumer was part of the Senate’s Gang of Eight in 2013 that came up with sweeping bipartisan legislation aimed at improving the US's immigration laws. Among other proposals, the measure called for cancelling the diversity lottery.

After Mr Trump attacked the Democrat over the programme, Republican Senator Jeff Flake – who dramatically announced last week that he would not seek re-election – came to Mr Schumer's defence.

“Actually, the Gang of 8, including @SenSchumer, did away with the Diversity Visa Program as part of broader reforms. I know, I was there,” Mr Flake, an outspoken critic of Trump, wrote on Twitter. “In fact, had the Senate Gang of 8 bill passed the House, it would have ended the Visa Lottery Program AND increased merit based visas.”

The bill passed in the Senate but died in the House.

Mr Schumer also responded to Mr Trump's criticism by blasting the President for polticising the New York attack.

“I have always believed and continue to believe that immigration is good for America,” Mr Schumer said in a statement.

“President Trump, instead of politicising 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.”

The senator called on Mr Trump “to immediately rescind his proposed cuts to this vital anti-terrorism funding.”

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

On the Senate floor later on Wednesday, Mr Schumer doubled down on his denunciation of the President's tweets.