Hundreds of immigrants across the US have been arrested as part of a crackdown on areas dubbed "sanctuary cities".

Immigration and Customs Enforcement (ICE) said it arrested nearly 500 people from communities in Los Angeles, Philadelphia, New York and the state of Massachusetts, among others.

The scale of the four-day crackdown is of a similar size to previous mass arrests, yet this time ICE agents targeted areas where police and local government officials had refused to fully enforce federal immigration laws.

The action is part of Donald Trump's push to deport America's estimated 12 million illegal immigrants.

The President demanded ICE agents be allowed access to prisons and requested local governments delayed the release of illegal immigrants so that enforcement agents can arrest them.

But local authorities in liberal areas across the country refused to allow them access and introduced restrictions preventing police fully cooperating with ICE agents.

A number of authorities refused to delay the release of prisoners on the grounds that it would be illegal.

Attorney General Jeff Sessions responded by threatening to withdraw funding from the authorities, but US courts have so far said doing so would be unconstitutional.

Following the anti-immigration surge, ICE's acting director said in a statement: "Sanctuary jurisdictions that do not honour detainers or allow us access to jails and prisons are shielding criminal aliens from immigration enforcement and creating a magnet for illegal immigration.

"As a result, ICE is forced to dedicate more resources to conduct at-large arrests in these communities."

According to ICE, 317 out of the 498 people taken into custody as part of the operation had a conviction of some kind. The offences included non-violent crimes such as drug charges, shoplifting and "illegal reentry".

The most frequent offence was for drink driving, for which 86 people had convictions.

It claimed another 18 people arrested were associated with gangs. ICE's broad definition of gang membership has previously been condemned by human rights groups, who argue it persecutes people from minority backgrounds.

Donald Trump's international Presidential trips Show all 22 1 /22 Donald Trump's international Presidential trips Donald Trump's international Presidential trips French President Emmanuel Macron and US President Donald Trump AFP/Getty Images Donald Trump's international Presidential trips French President Emmanuel Macron and US President Donald Trump talk as they leave the Army Museum at Les Invalides in Paris AFP/Getty Images Donald Trump's international Presidential trips German Chancellor Angela Merkel and US President Donald Trump arrive for the group photo at the G7 Taormina summit on the island of Sicily in May 2017 Getty Images Donald Trump's international Presidential trips Mr Trump was pressed on the subject at the G7 summit in Italy Getty Donald Trump's international Presidential trips US President Donald Trump gives a speeech at the Warsaw Uprising Monument on Krasinski Square Getty Donald Trump's international Presidential trips US President Donald Trump and Britain's Prime Minister Theresa May during a ceremony at the NATO headquarters before the start of a summit in Brussels, Belgium Reuters Donald Trump's international Presidential trips Montenegro's Prime Minister Dusko Markovic is seen to the right of Donald Trump at a Nato summit in Brussels REUTERS Donald Trump's international Presidential trips Pope Francis meeting with US President Donald J. Trump EPA Donald Trump's international Presidential trips Pope Francis poses with US President Donald Trump and First Lady Melania Trump AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump arrives at Palazzo del Quirinale ahead of the meeting with Italian President Sergio Mattarella Ufficio Stampa Presidenza della via Getty Donald Trump's international Presidential trips US President Donald Trump is seen during a joint press conference with the Palestinian leader at the presidential palace in the West Bank city of Bethlehem AFP/Getty Images Donald Trump's international Presidential trips Palestinian president Mahmoud Abbas meets US President Donald Trump PPO via Getty Donald Trump's international Presidential trips Israeli Prime Minister Benjamin Netanyahu speaks with US President Donald Trump prior to the President's departure GPO via Getty Images Donald Trump's international Presidential trips US President Donald Trump and Israel's Prime Minister Benjamin Netanyahu shake hands after delivering a speech at the Israel Museum AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump and First Lady Melania Trump lay a wreath in the Hall of Remembrance as White House senior advisor Jared Kushner and Ivanka Trump watch on during a visit to the Yad Vashem Holocaust Memorial museum AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump visit to Yad Vashem Holocaust museum in Jerusalem accompanied by Prime Minister Benjamin Netanyahu GPO via Getty Images Donald Trump's international Presidential trips US President Donald Trump takes his seat before his speech to the Arab Islamic American Summit in Riyadh in Saudi Arabia Reuters Donald Trump's international Presidential trips Saudi Arabia's King Salman bin Abdulaziz al-Saud, US President Donald Trump and US First Lady Melania Trump look at a display of Saudi modern art at the Saudi Royal Court in Riyadh AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump and Saudi Arabia's King Salman bin Abdulaziz al-Saud take part in a signing ceremony at the Saudi Royal Court in Riyadh AFP/Getty Images Donald Trump's international Presidential trips King Salman presents Donald Trump with The Collar of Abdulaziz al-Saud Medal at the Royal Court Palace on 20 May AP Donald Trump's international Presidential trips US President Donald Trump is welcomed by Saudi King Salman bin Abdulaziz al-Saud upon arrival at King Khalid International Airport in Riyadh AFP/Getty Images Donald Trump's international Presidential trips U.S. President Donald Trump and first lady Melania Trump walk on the South Lawn prior to their first foreign trip Getty Images

ICE said the four-day push did not target "Dreamers", who entered the country as children and remain under the Obama-era policy under the Deferred Action for Childhoods Arrivals (DACA).