When Anthony Miranda was sworn in as police chief of Irwindale, California, four years ago, the department in this small gravel-mining city about 20 miles from downtown Los Angeles was in the midst of a downward spiral. Three officers had recently been accused of serious crimes. One had embezzled $250,000 of his 89-year-old father’s life savings, another had sexually assaulted a woman delivering newspapers on a side street at dawn, and the third had molested minors under his supervision in an “explorer scout” program. There were 14 internal investigations underway.

The problems with the police force were not just troubling—they were existential. In August 2013, the city’s insurer, the California Joint Powers Insurance Authority, had threatened to revoke Irwindale’s liability insurance unless City Hall and the police department took substantive steps to tackle internal corruption, the likes of which had led to nearly $2 million in settlements paid out over a five-year period.

Loss of insurance would have been the death knell for the local police force: In recent years, cities in Illinois, Pennsylvania, Ohio, Tennessee, Louisiana, and elsewhere in California have had to disband their police departments after losing  coverage. A big claim—like the $2.75 million settlement later awarded to the victim in the “explorer scout” case—could bankrupt a municipality with a small budget and tax base, like Irwindale. The city has only 1,400 people.

“I told them if we didn’t get our house in order, we would lose it,” Miranda told me. He had watched in 2010 as police officers in nearby Maywood turned in their badges and radios in a small ceremony after that city’s liability coverage was withdrawn by CJPIA, due in part to the excessive number of claims against the police. “It was pretty sobering,” he said. Yet the company’s threat, and the “performance improvement plan” it required officials to follow, finally set Irwindale on a path toward overhauling its dysfunctional department.

While much attention has been paid to the issue of police misconduct —with 14 cities pursuing consent decrees with the Department of Justice—what is less well known is how liability insurers can put a private-sector spin on reform, by demanding structural changes in the police departments that they cover. In April, a paper by the University of Chicago law professor John Rappaport detailed the effects these companies have had on police forces across America.

In Wisconsin, for instance, an insurer in 2002 recommended new training and supervision of SWAT teams in the Lake Winnebago area in the aftermath of two botched drug raids. In 2010, a police chief in Rutledge, Tennessee, was fired to appease the town’s liability insurer after assault allegations were leveled against him. In many other states, police forces have been asked to adopt new policies regarding body cameras, strip searches, and use of force.

Although an outside company exerting influence on local police may not seem compatible with good governance, there are hidden advantages to insurers’ monitoring police departments and suggesting improvements. For one, insurance companies are apolitical. “I think the debates about policing have become so fraught and so inflammatory,” Rappaport told me. “To have this big, well-heeled institution saying, ‘We’re not interested in that debate, we just want to get those numbers down’—it can make reform more palatable because it takes the electricity out.”

Cash-strapped cities, meanwhile, can benefit from the services offered by liability insurers, from police training sessions and applicant screening to data-driven insights gleaned from the insurer’s work with other municipalities. In Irwindale, there were biweekly meetings with an outside risk manager; hundreds of hours of training sessions for police officers on topics like sexual harassment and use of force; and outside reviews of all internal-affairs investigations. The department had 18 months to clean up its act in order to keep its coverage. “I’ve never seen such a thing in my whole career,” Miranda said. “I’m going on 27 years.”

The possibility of private-sector police regulation is of heightened interest under a Trump administration that intends to minimize the Department of Justice’s role in police oversight. Earlier this spring, for example, Attorney General Jeff Sessions unsuccessfully tried to scuttle the police consent decree in Baltimore. “Insurers have a much bigger role to play in a world where the DOJ is not going to be aggressive, and we’re going to have to rely on private plaintiffs to bring lawsuits and seek money damages,” Rappaport said. (Last month, Republican lawmakers introduced a bill in Congress that would make it nearly impossible to sue the police in the first place, including in brutality cases).

At the moment, companies’ influence is primarily felt in small and midsize cities, because major cities have large enough tax bases and budgets to absorb high damages from lawsuits. They generally “self-insure,” which renders them relatively impervious to market forces. But there are signs the dynamic may be shifting. William Murphy Jr., a Baltimore trial attorney specializing in criminal and catastrophic injury cases, who represented Freddie Gray’s family in their police-brutality lawsuit there, is fine-tuning a new bill on behalf of the Baltimore city council that would require the city to purchase liability insurance. Murphy, who played himself on The Wire, became intrigued by the idea after reading Rappaport’s paper. He was particularly interested in the risk-management techniques used by insurers—like sending updates on legal developments affecting law-enforcement agencies—to prevent misconduct from happening in the first place.

According to Murphy, Baltimore can acquire liability insurance from a Maryland risk-sharing pool created for local governments. “Our city can’t complain it’s too expensive, because God knows what they’ve been doing in the past has been expensive, without even giving fair settlements to injured people,” he noted. Maryland, like many states, has caps on the monetary damages that can be awarded in lawsuits against local governments. In 2011 an $11.5 million jury award in a police-brutality suit in Prince George’s County was reduced to just $400,000. Major cities electing to purchase liability coverage, Murphy said, will benefit both communities and police departments. “People will be able to get the settlements juries award, with this additional protection of insurers insisting on proper training and identifying bad actors,” he said.

Threatening to revoke a city’s insurance coverage can spur or speed reforms, but it’s not a perfect tool, said Norman Lefmann, assistant executive officer of CJPIA, the risk-sharing pool that insures Irwindale and some 120 other municipalities in California. “We have no ultimate enforcement ability, so it still does require the city and police department to have the wherewithal to make the changes that need to be made,” he pointed out. “We have no control over them.”

Police Chief Miranda describes the year and a half his officers in Irwindale spent under their insurer’s performance-improvement plan as “the biggest significant emotional event for this department.”

Before the threat of losing their insurance materialized, the city had failed to invest in adequate training for police officers, citing budgetary concerns. The two-dozen members of the department only had about 300 hours of training in three years. But fearful that their force could be disbanded without sufficient reform, the city dedicated money from asset forfeitures—a practice that itself is under scrutiny—and used it on training sessions for officers. Members of the police department participated in around 1,000 hours of training in a single year after CJPIA got involved.

As the trials of the three policemen accused of wrongdoing moved through the courts, Miranda reviewed spreadsheets with the city’s risk manager and regularly sent status reports for ongoing investigations. “It was pretty tough but long overdue,” he said. Eventually, the three officers went to prison for their crimes, and Irwindale kept its liability insurance and police force.

Lefmann said Irwindale’s claims have gone down since the performance improvement plan was completed, but was quick to note that “when there are systemic issues, it doesn’t change overnight.” And, because of the recent multimillion-dollar settlement in the “explorer scout” case, Irwindale is still exposing other members of the risk pool to claims that far outpace the small city’s contributions.

Nevertheless, “now we’re in a much better place,” Miranda said. His remaining police officers were able to “change their morale and attitude and get right,” he said. “At the end of the day this very negative thing was a very positive thing for our city.”