The ACLU of Pennsylvania has settled a federal civil rights lawsuit against officials at the Montgomery County prison alleging retaliatory efforts to bar its lawyers from meeting with inmates.

The lawsuit, filed Thursday, said lawyers affiliated with the ACLU were told they couldn’t meet with incarcerated people unless they represented them in a criminal proceeding. The ACLU said this practice seemed to apply only to its lawyers, and came amid ongoing lawsuits it had filed about procedures at the county jail.

The agreement filed Monday eliminates that issue by explicitly allowing any attorney, ACLU-affiliated or otherwise, to meet with inmates unless safety concerns or misconduct issues exempt them.

» READ MORE: ACLU lawyers say they’re being barred from interviews at the Montgomery County jail in retaliation for earlier investigations

The ACLU of Pennsylvania’s legal director, Witold J. Walczak, said he was pleased with the quick resolution of the case and its restoration of what he said was an essential function of the organization.

“Both for ongoing and prospective litigation, we need access to people in the jail,” Walczak said. “If the county could successfully cut off detainees’ access to civil rights lawyers, they insulate themselves from constitutional accountability, and that just can’t be.”

A county spokesperson did not return a request for comment.

In the lawsuit, attorneys for the ACLU said that they had successfully met with inmates through video calls “dozens of times” between October and March but that those visits were cut off in early March. When the group asked for an explanation, a county official mentioned a previously unknown policy of allowing only attorneys representing clients to visit them in jail.

This caused the jail to cancel several standing appointments the ACLU had made, including with two inmates who had requested to meet about issues within the jail, and a third inmate whose family had written to the group asking for help.

Walczak said the county had not responded to letters asking for clarification about the policy, and had not contacted the ACLU about the issue until the lawsuit was filed.