District Attorney Larry Krasner's move to keep unreliable police officers from testifying in criminal cases could safeguard innocent people and in the long run save taxpayers millions.

He's asked the police, and they have agreed, to compile a list of  cops with serious violations, including lying in court, engaging in racial profiling, and using excessive force.  This would help prosecutors flag troubled officers and possibly prevent their testimony,  and allow potentially damaging information against officers to be turned over to defense attorneys.

It would expand the list of  66 officers that former District Attorney Seth Williams had compiled, and lift the secrecy that the District Attorney's Office kept for years.

Troubled cops cost people their freedom, leave the real criminals at large, and drain the city's coffers.The city should take Krasner's reforms a step further and change its labor agreement with the Fraternal Order of Police. For years, police brass have complained that they can't do much about bad cops. They fire them. They transfer them. And, arbitrators put the officers back in their old jobs.

That problem can be solved in part if the city commits to changing the FOP contract, which gives arbitrators the ability to reverse police discipline. It won't necessarily be easy, and could take two or three contract cycles — or about a dozen years — but it's worth starting the process. In the last contract, which runs until 2020, no significant changes were made to the grievance and arbitration procedures. Those procedures exist to protect good cops from unfair management practices,  but can be used to protect bad cops from justice.

Take the case of Khanefah Boozer, 33, of Oxford Circle. He sat in jail for three years on a cop's assertion that Boozer shot at him.  Police took the cop's word, and never properly investigated the case. When the case finally went to trial in 2014, another man said that he — and not Boozer — fired the gun.

Boozer will never get those three years back.

In May, a court awarded Boozer $10 million in his civil case. It is the largest-ever civil verdict against a city cop, and it is likely to chew up a quarter of the money the city set aside to cover liability cases for all its departments.

Think of what else that $10 million could cover — like hiring more police, cleaning public schools of hazardous substances, and repairing storm sewers.

These expenses keep mounting. Since 2016, the District Attorney's Office has dropped 800 cases brought by a half-dozen narcotics cops accused of misconduct. Settlements won by former defendants are at $2 million and counting. Another list of tainted cops has already sparked over 6,000 petitions for new trials.

Krasner's policy also can help sift out the minority of corrupt cops that pull down the Police Department, which is yet another reason the city and the FOP should get working on new discipline procedures.

Amending the FOP contract won't be free.  The city may have to offer police better pay or more time off. And the union's going to have to understand that it is helping its members and our city by getting bad cops off the streets.