A federal judge ruled that President Donald Trump’s deployment of National Guard troops in Washington was likely unlawful in the latest setback to the president’s military mobilizations in Democrat-led cities.

U.S. District Judge Jia Cobb said in a Thursday decision that the deployment of troops irreparably harmed the city’s “exercise of sovereign powers.” But she gave the federal government 21 days to appeal before the order takes effect “to prevent potential disruption to the functioning of the District and the National Guard.”

The ruling comes as the administration is separately engaged in court fights over Trump’s plans to deploy the National Guard in Chicago and Portland, Oregon. The U.S. Supreme Court is weighing whether to let the administration proceed with plans to use troops in Chicago after lower courts blocked the move.