Maryland Gov. Martin O'Malley. (AP Photo/Patrick Semansky)

Maryland Gov. Martin O’Malley has instructed a state-run jail in Baltimore to stop honoring federal requests to detain inmates beyond their scheduled release dates in order to explore potential immigration violations, unless there is probable cause that those who are being held have broken the law.

The new policy followed an opinion by the Maryland attorney general’s office that such detentions in local and state-run jails could be unconstitutional, in light of recent federal court rulings.

The decision, conveyed in a letter this week, was hailed Friday by immigrant-rights advocates, who said it should help scores of immigrants picked up for traffic violations or other minor infractions and then held for potential deportation.

Although O’Malley’s move directly affects only the state-run jail in Baltimore, Gustavo Torres, executive director of CASA of Maryland, said “we look forward to counties across the state following suit.”

He praised O’Malley (D), who is weighing a 2016 White House bid and has been outspoken on immigrants’-rights issues, for “recognizing the fundamental constitutional rights of all Marylanders.”

Sirine Shebaya, a lawyer for the American Civil Liberties Union of Maryland, which pushed for the change, said she, too, is hopeful that Maryland jurisdictions will join hundreds of other communities across the country that have recently taken similar steps. She said the ACLU has not yet been in contact with those jurisdictions about how they will respond.

At issue are so-called detainers issued by U.S. Immigration and Customs Enforcement (ICE) that ask local law enforcement agencies to maintain custody of suspected illegal immigrants for up to 48 hours after they would otherwise be released.

ICE contends that the detainers are a “critical” tool in its efforts to “identify and ultimately remove criminal aliens who are currently in federal, state or local custody.”

But after a string of court rulings, the Maryland ACLU wrote letters to county detention centers pressing them to change their policies. Those letters prompted a request for advice from the attorney general’s office.

O’Malley announced this year that the state would limit the ICE detainers that the Baltimore jail would honor, with the aim of only holding those who immigration officials said pose “an actual threat to the public’s safety.”

In practice, that policy “didn’t really go far enough,” said Shebaya, because it allowed ICE to continue unwarranted detentions by merely checking more boxes on the paperwork it filed. She said the policy announced this week is significantly improved.

O’Malley’s action is the latest in a series of recent moves that won praise from pro-immigrant groups. Last month, he got in a spat with the White House over what to do about thousands of unaccompanied children streaming over the U.S. border. O’Malley made national headlines when he said that returning the children to their home countries, as President Obama had suggested, would send them “back to certain death.”