BALTIMORE (AP) — Maryland’s highest court has ruled that the city of Baltimore must pay for two settlements resolving claims that police officers from a rogue unit planted guns during arrests.

The Court of Appeals’ unanimous decision Friday rejected the city’s argument that officers from the Baltimore Police Department’s Gun Trace Task Force acted so far outside the scope of their employment that the city can’t be liable for their actions. The ruling said it’s reasonable to conclude that the police department should have known about the officers’ misconduct.

The Baltimore Sun reports the city reached separate $32,000 settlements with two men, Ivan Potts and William James, who accused officers of planting guns on them. Although the city did not dispute the facts of either case, it argued that the city should not have to pay the settlement amount.

The Court of Appeals judges said the ruling only applies to the two cases and is not a blanket decision covering all other cases involving task force members.

City Solicitor Dana Moore said the city plans to fight the remaining cases. The city faces dozens of claims that it failed to properly supervise members of the Gun Trace Task Force.

The officers have denied planting guns, but several have pleaded guilty to federal corruption charges and been sentenced to prison terms. Members of the plainclothes squad resold stolen drugs, conducted robberies and falsified evidence, prosecutors said.