WASHINGTON — The Justice Department has sued local and state governments in California, New Jersey and Washington State as part of a “significant escalation” in the Trump administration’s fight against so-called sanctuary laws aimed at limiting cooperation with federal immigration authorities, Attorney General William P. Barr said on Monday.

“These policies are not about people who came to our country illegally but have otherwise been peaceful and productive members of society,” Mr. Barr said in a speech at the National Sheriffs’ Association conference in Washington, D.C. “Their express purpose is to shelter aliens whom local law enforcement has already arrested for other crimes.”

Such laws passed by local and state governments generally restrict whether and how the local police shares information with the federal authorities about a person’s immigration status. Five states, as well as counties in nearly 30 states, have enacted them.

Under President Trump, Justice Department officials have argued that such laws are unconstitutional and obstruct the federal government’s ability to enforce immigration laws, including removing immigrants who entered the country illegally or committed a crime.