District Attorney Larry Krasner has a growing credibility problem and needs to take steps soon to repair the damage to his office.

During an extraordinary hearing in federal court last week, one of Krasner’s former prosecutors testified that his office colluded with defense attorneys to try to overturn a murder conviction, and encouraged her to lie to the judge to conceal the shoddy handling of the man’s appeal.

In sworn testimony before U.S. District Judge Paul S. Diamond, former Assistant District Attorney Jaclyn Mason said she refused to move forward with a plan to take the blame and instead resigned last month.

The federal court hearing came on the heels of other damaging rulings that determined prosecutors in Krasner’s office have been lying to the courts.

The Pennsylvania Supreme Court ruled last month that Krasner’s office misled judges in several previous cases alleging wrongful convictions.

Justice Kevin Dougherty wrote that Krasner’s office repeatedly “made unreliable concessions unsupported by the facts and law” and “violated its duty of candor.”

In December, a panel of federal judges disbarred a prosecutor in Krasner’s office from practicing in the region’s federal court after concluding he “lied repeatedly” while trying to overturn the death sentence of a man convicted of killing a couple in East Mount Airy and leaving their infant daughter inside to die.

Mason’s testimony last week amounted to strike three.

» READ MORE: Philadelphia’s World Cup and All-Star summer proved something. Let’s not waste it. | Editorial

She testified that supervisors in the district attorney’s office failed to independently investigate the trial transcripts, witness interviews, or homicide files before determining whether Dennis Johnson’s conviction should be set aside.

Mason had recommended Johnson’s conviction be overturned, but said she did so at the direction of her boss, Matthew Stiegler, the head of the Conviction Integrity Unit. She added that Stiegler met with Johnson’s defense lawyers, including from the Innocence Project, to discuss the best path to secure Johnson’s release.

“Matt told me, ‘If it’s good enough for the Innocence Project, it’s good enough for me,’” Mason said in court.

This week, two prosecutors in the district attorney’s office filed a court document claiming Krasner instructed them to push forward with Johnson’s appeal in a manner that would “protect the office.”

Assistant District Attorneys Katherine Ernst and Steven J. Wildberger wanted the state attorney general’s office to take over the appeal because of conflicts. But when they pressed Krasner to refer the case to state prosecutors, he “stated that there would be ‘consequences’ for anyone who notified the court of the conflict issues.”

For those keeping score, that would be strike four.

But there are two sides to every story. The hearing in Judge Diamond’s court has not concluded. Additional prosecutors from Krasner’s office, including Ernst and Wildberger, are expected to testify and shed more light on the handling of Johnson’s case.

In an interview with members of the Editorial Board, Krasner said he could speak more freely after the hearing ended. He added that more information would come out, and he hoped that until then the public would keep an open mind.

This board has long supported Krasner’s efforts to examine claims of wrongful convictions. But the board does not support cutting corners or lying to the court.

City, state, and federal prosecutors come into court with a level of credibility and trust earned over generations. Just as we have seen Donald Trump’s Justice Department fritter away its trust and credibility with repeated lies and sloppy lawyering, Krasner’s office risks doing the same.

That could result in a major setback for others who have been wrongfully convicted. It is extremely difficult to get convictions reversed, and often takes years. If the courts don’t believe the prosecutors in Krasner’s office, anyone seeking an exoneration may face an even steeper hurdle.

Studies indicate thousands of people nationwide are behind bars for crimes they did not commit, including some 4% of inmates on death row.

Many wrongful convictions nationwide are the result of misconduct by police or prosecutors as well as misidentification by eyewitnesses. Philadelphia has a history of police corruption and abuse that has largely gone unchecked.

» READ MORE: Four people killed by ICE agents. A lawless administration. It won’t stop unless voters act. | Editorial

Krasner’s decision to hold police accountable and investigate claims of wrongful convictions has been a long-needed correction. It has also animated Krasner’s law enforcement critics — of which there are many.

That is all the more reason why his office must ensure its work involving exoneration cases is beyond reproach.

Since taking office in 2018, Krasner’s office has freed 59 people, most of whom are Black men. That’s an impressive number in a short period of time.

By comparison, over the past 34 years, the Innocence Project has helped to exonerate 257 people nationwide, largely through the use of DNA technology.

But the state Supreme Court recently ordered the state attorney general to review any case in which the Philadelphia District Attorney’s Office wants to alter or overturn a past conviction.

This board wrote earlier this month that the state Supreme Court went too far in ordering the added layer of oversight by the state attorney — which will live on long after Krasner leaves office — for fear it could slow down appeals and politicize the process.

The court’s unprecedented overreach aside, the recent sworn testimony by a former prosecutor and two current prosecutors with firsthand knowledge of the office’s inner workings has raised doubts about the integrity of Krasner’s Conviction Integrity Unit.

Public confidence in the district attorney’s office is paramount. Nothing should be off the table to ensure justice is delivered to victims and the accused in a safe, fair, and legal manner.