People march across the Brooklyn Bridge to protest the planned dissolution of DACA in Manhattan, New York City, U.S. September 5, 2017. REUTERS/Stephen Yang

SAN FRANCISCO (Reuters) - The U.S. Justice Department on Monday said it would appeal a court order blocking President Donald Trump’s executive order that sought to restrict federal funds for so-called sanctuary cities.

U.S. District Judge William Orrick III of San Francisco earlier this year ruled that Trump’s sanctuary cities order was likely unconstitutional and stopped it from taking effect.

Trump issued the order in January, shortly after he was inaugurated, directing that funding be slashed to all jurisdictions that refuse to comply with a statute that requires local governments to share information with U.S. immigration authorities.

Sanctuary cities generally offer safe harbor to illegal immigrants and often do not use municipal funds or resources to enforce federal immigration laws.

Dozens of cities and other local governments, including New York, Los Angeles and Chicago, have joined the growing “sanctuary” movement.

The Trump administration contends local authorities endanger public safety when they decline to hand over for deportation illegal immigrants arrested for crimes.

California’s Santa Clara County - which includes the city of San Jose and several smaller Silicon Valley communities - sued over Trump’s order, saying it was unconstitutional. San Francisco filed a similar lawsuit. They argued Trump’s order could improperly choke off vast swaths of federal funding for sanctuary cities.