Maryland Attorney General Brian E. Frosh (D). (Jonathan Newton/The Washington Post)

Maryland Attorney General Brian E. Frosh this week advised state and local law-enforcement agencies not to hold undocumented immigrants past their release dates on behalf of federal authorities unless they have a judicial warrant or probable cause.

He said in a memo Thursday that following his guidance would allow agencies to “comply with federal law in a manner that respects the constitutional rights of individuals, protects local agencies and officials from potential legal liability, and allows them to remain faithful to their mission of promoting public safety.”

Frosh (D) warned that state and local jails could be subject to legal challenges regarding unconstitutional detention if they hold individuals suspected of immigration violations past their release dates without a judicial warrant or probable cause.

“As an overriding principle, the government bears the burden of proving that the detention of someone beyond the person’s State-law release date does not violate the Fourth Amendment and its Maryland counterpart,” the memo said.

Frosh said that state and local officers can share information about a detainee’s immigration status with federal authorities, but are not required to do so.

He also advised state and local police not to take action to enforce federal immigration laws — such as investigating suspected immigration violations — unless they have agreements to take part in such efforts through a special federal program.

The advice, which is not legally binding, comes amid changes that the Trump administration has made to immigration enforcement policies, including an executive order threatening to withhold federal funds for “sanctuary” jurisdictions. The administration has not clearly defined which regulations or laws would make a state or locality vulnerable to such sanctions, and a federal judge recently blocked part of the order.

A bill to limit state and local cooperation with federal immigration enforcement efforts died in the state Senate this year, causing strife among Democratic lawmakers who disagreed over how strict the regulations should be.