President Donald Trump said Wednesday he was withdrawing national guard troops from Chicago, Los Angeles and Portland, following a series of legal setbacks over his military deployments in U.S. cities.

The Republican had sent troops into several cities run by Democrats during his first year back in power, in what he called a crackdown on illegal immigration and crime.

Local leaders slammed the moves as authoritarian overreach and launched a string of successful legal challenges, with the U.S. Supreme Court last week blocking the Chicago deployment.