RICHMOND — The city of Richmond filed a federal lawsuit Wednesday against President Donald Trump to challenge his executive order to withhold federal grants from so-called sanctuary jurisdictions, essentially cities that refuse to collaborate with federal immigration laws, including arresting people whose only infraction is being in the country illegally.

Related Articles Letters: Stalled police reform | Promoting flexibility | Climate votes | Trivial effect | No more excuses

Letters: Wrong doctor for job | Judging words, deeds | Misdirecting fault

Federal judge blocks Postal Service changes that slowed mail

Why some Asian Americans are on the front lines of the campaign against affirmative action

TV tonight: Joe Biden participates in town-hall special The lawsuit, in U.S. District Court in San Francisco, names the president, U.S. Attorney General Jeff Sessions and Secretary of Homeland Security John Kelly and seeks an injunction to halt Executive Order 13768 by declaring it unconstitutional.

“This is an unprecedented abuse of federal power and is full of arrogance by Washington, D.C., to break up the trust of the people of Richmond and the public servants that represent them,” said Joe Cotchett, the lead attorney on the case. “This lawsuit was filed not just for Richmond, but on behalf of every little city not only in California but across the nation.”

The executive order, signed Jan. 25, states sanctuary cities that refuse to comply with the president’s federal immigration policy will not be eligible for federal grants, except as deemed necessary by the attorney general or secretary of homeland security.

Richmond, one of the most racially diverse cities in the Bay Area, relies heavily on federal assistance to fund its many housing, policing, job training, literacy and other programs, and received an estimated $77 million in federal grants this fiscal year. That includes approximately $26 million a year from the U.S. Department of Housing and Urban Development that goes toward public housing and Section 8 vouchers for some of the city’s neediest residents.

Under the executive order, money that has already been spent or committed to programs or jobs this fiscal year could also be demanded by the federal government, which totals an estimated $41 million, according to the City Manager’s Office.

If that happens, it would be beyond catastrophic for Richmond and other cities, Cotchett said. “There are people who have already taken jobs who have children that are now going to be told your job is not going to be funded. It’s scandalous.”

Richmond has had sanctuary policies on the books since 1990, spurred by the wave of Central American refugees who arrived in the city after fleeing civil wars in their home countries. The policies include a ban that prevents the Richmond Police Department or any other city employees from informing, assisting or cooperating with ICE without the specific authorization of the Richmond city manager or the chief of police. Federal immigration officers are also not allowed to identify themselves as local police officers, practices that are aimed at making the city’s large Latino population feel safe and more inclined to report crime.

More than 30 percent of Richmond residents were born overseas, according to the 2015 census.

“Providing safety in the city requires actively engaged residents who can interact with police without fear,” said Richmond Police Chief Allwyn Brown.

The lawsuit filed Wednesday maintains the president does not have the constitutional authority to authorize such an order and that it does not define “sanctuary jurisdictions.”

In January, San Francisco became the first jurisdiction to sue Trump over the executive order to withhold money from sanctuary cities.