A stipulation in a Kentucky police contract prohibited officials from initially firing the officers involved in Breonna Taylor's death in Louisville.
The disciplinary history of a Chicago police officer who fatally shot Laquan McDonald had been deleted under the department's contract, so officials didn't know about the officer's previous bad behaviour.
A Seattle officer fired for arresting an elderly Black man who used a golf club as a cane got US$100,000 in back pay, thanks to the union contract that said the investigation missed a deadline.
Collective bargaining agreements for officers provide protections that stand in the way of accountability, even when the federal government is overseeing an agency through a consent decree, experts said. The killing of George Floyd by a Minneapolis officer ignited protests and calls for change, but experts say police contracts threaten to undermine those efforts.
Contracts designed to ensure officers receive fair wages and benefits have spilled over into public policy.
"We're ignoring the purpose of the bargaining rights and we're allowing them to step outside of what they were originally supposed to cover," said Ayesha Bell Hardaway of the Case Western University School of Law.
"When talk about discipline, accountability and use of force protocols, we should not be talking about collective bargaining rights because those terms have no business inside of the contracts in the first place."
When contracts are written in private negotiations, that means little input from communities.
"Without transparency there can't be any accountability," she said.
James Pasco, executive director of the 351,000-member National Fraternal Order of Police, recently said the issue should be better screening and more training for recruits, not limiting contracts.
"We don't get to decide who our members are," he said.
Stephen Rushin, a Loyola University Chicago law school professor, has studied police contracts nationally and detailed their problems in an article published in the Duke Law Journal.
"A substantial number of these agreements limit officer interrogations after alleged misconduct, mandate the destruction of disciplinary records, ban civilian oversight, prevent anonymous civilian complaints, indemnify officers in the event of civil suits, and limit the length of internal investigations," he said.
Some contracts let an officer see videos of offences before an officer is interviewed, give an officer a 48-hour delay before they speak to internal affairs and allow an officer to appeal a punishment to arbitrators who can overturn rulings, an AP investigation found.
"These examples bolster the hypothesis that some union contract provisions may impede effective investigations of police misconduct and shield problematic officers from discipline," Rushin said.
The problem is more than union overreach, he said. "It's an indictment of the city for granting those concessions. Police unions only have the power that politicians give them."
Seattle is an example of how elected officials allowed police unions to insert controversial measures during closed negotiations, over the objections of community groups.
"The Seattle story is a microcosm of what's happening elsewhere in the country," Rushin told AP.
"It highlights perfectly this conflict between major reform efforts and the extent to which labour protections can make it hard to engage in real change."
In 2011, a federal judge found that the Seattle Police Department had engaged in a pattern of excessive force. The city entered into a settlement agreement, or consent decree, the following year and passed an accountability measure for additional oversight.
About 70 law enforcement agencies nationwide have faced consent decrees, according to the US Justice Department.
The police overhaul bill in Congress includes a section that would cut federal funds for a law enforcement agency that "enters into or renews any contractual arrangement, including a collective bargaining agreement with a labor organization, that conflicts with any terms or conditions contained in a consent decree".
By 2018, the judge in Seattle said the department was in compliance, but warned that "if collective bargaining results in changes to the accountability ordinance that the court deems to be inconsistent with the consent decree, than the city's progress ... will be imperilled".
Seattle Mayor Jenny Durkan said the city was a national model for overhauling the police department. But community members felt duped after she negotiated in private with the union for a contract that violated the accountability measure and the consent decree.
One Seattle officer who benefited from the union contract in recent years was Cynthia Whitlach. She had arrested an elderly Black man, claiming he swung his golf club cane at her. Her dashcam video showed he had not.
After the charges were dismissed, the man filed a federal lawsuit and was awarded US$325,000. A jury found Whitlatch had engaged in racial discrimination.
Whitlatch was fired but the union filed a grievance claiming the investigation was not completed in 180 days, as required by the contract. The city awarded her US$100,000 in back pay.
Minor stipulations in police contracts like the 180-day rule are common. A stipulation in a Kentucky police contract kept the officers involved in Taylor's death from immediately getting fired.
Under the Kentucky police bill of rights and the Louisville police contract, an officer cannot be disciplined "without just cause", said Annale Taylor, the city's deputy general counsel, who is not related to Breonna Taylor.
In order to establish "just cause", a thorough investigation must be done, she said. If officers are fired before that work is complete, they could appeal, go back to work and sue, she said.
Stipulations in contracts also force agencies to destroy discipline records. A Chicago officer went unnoticed for years thanks to the department's collective bargaining agreement.
Officer Jason Van Dyke had claimed McDonald threatened him with a knife, and Van Dyke said he fired in self-defence. That story changed when a video showed McDonald hadn't charged the officers and was walking away when Van Dyke shot him 16 times.
Van Dyke was charged with second-degree murder. Rushin's research found that Van Dyke had more than 20 complaints against him since 2001.
Before McDonald's killing, authorities had never pursued disciplinary action against Van Dyke or flagged him as problematic in part because the union contract says officials must erase records of old complaints, so review boards aren't able to see patterns of bad behaviour, Rushin said.
"Perhaps it is no coincidence that less than 2 per cent of all civilian complaints against Chicago police officers result in any sort of disciplinary action," his report found.