It’s a lesson we’re still learning. Under the watchful eye of the U.S. Justice Department, Seattle is still trying to reform a police department accused of racial bias and excessive force. Mayor Ed Murray has installed a new chief, Kathleen O’Toole, who has, in turn, shaken up police leadership. New rules for handling complaints, shootings and oversight are being put into place, and new technologies, such as body cams, are being deployed to improve policing and regain public confidence.

Murray says O’Toole’s job is to “drive positive culture change.” That’s no easy task. Some of the rank-and-file remain skeptical. The head of the police union, Ron Smith, has claimed that President Barack Obama has created a “war on cops,” suggesting O’Toole’s cultural change mandate is a long-term project. You have to admit there’s a problem before you can fix it.

Have we ever been here before? Is there anything we can learn about the challenges of reforming the Seattle Police Department? A new book answers yes.

Seattle Justice: The Rise and Fall of the Police Payoff System in Seattle by former King County prosecutor Christopher T. Bayley, published by Sasquatch Books this fall, is an eye-opening new memoir that offers perspective on how hard it is to reform local law enforcement, but reassures that big changes can be made.

Bayley has been working on his book for about 10 years and is an unlikely hero in modern Seattle terms: He was a young Republican attorney in the 1960s who decided to take on a Seattle institution, the longtime incumbent King County prosecutor and boss of the local GOP establishment, Charles O. Carroll. Carroll ruled the prosecutor’s roost from 1948 to 1970 and was a key cog in a system that helped to maintain systemic police corruption in Seattle and King County.

That culture of corruption began with a pervasive payoff system that had been in place, in one version or another, since the 19th century. Seattle was a frontier city built on vice. Vice-related taxes, fees, bribes and protection money had been flowing through city and county politics from almost the beginning. Call it trickle-up economics. Prostitutes, homosexuals, club owners and gambling operators paid bribes and protection money to the police, who, in turn, passed it up the departmental chain of command. In return, law enforcement looked the other way, cracking down on those who wouldn’t play the game.

At times, it proved to be enormously lucrative. In the early 1900s, the police chief, Charles “Wappy” Wappenstein, collected $10 per month for every sex worker in Seattle, and there were hundreds. Prohibition offered new opportunities for the police, such as the protection of illegal speakeasies. That racket lasted even after booze was legal again, as bar owners paid police officers to allow them to operate all night and on Sundays in violation of restrictive blue laws.

After World War II, gambling survived in small-stakes cardrooms, bingo parlors and pinball arcades. It sounds penny-ante, but it wasn’t. Bayley writes that in 1964, pinball profits alone were generating $25 million a year—nearly $200 million in today’s dollars. Bingo games, often rigged and sponsored by fake nonprofit fronts, were generating the equivalent of millions more. In other words, the trickle-up payoffs were not inconsequential.

The post-World’s Fair, modern city was ripe for change, however. A coalition of Republicans and Democrats came together to elect fresh faces to the old-boy City Council. The local media—newspapers, magazines (including the original Seattle) and TV stations—began poking around into the complaints of bar owners who objected to the payoff system. Investigations into SPD were generally stonewalled by the department and Carroll, who denied any problem, although his close friendship with at least one major gambling figure raised suspicions.

Bayley doesn’t think that Carroll himself was corrupt in monetary terms, but rather that he liked being a power broker over judges, cops, attorneys and politicians. He kept files on them, not unlike J. Edgar Hoover, says Bayley, to maintain his influence. The payoff system was the status quo, and he was there to protect it.

Social turmoil also brought pressures on the Seattle policing system as the ’60s rolled along. The African-American community protested police shootings and crackdowns on black protesters. Carroll’s control of the county’s GOP came under challenge from a more socially conscious generation of liberal Republicans—yes, they once existed—including John Spellman, Governor Dan Evans and Attorney General Slade Gorton. Young Bayley went on a fool’s errand to challenge Carroll’s reelection in the 1970 GOP primary. No one thought he had a chance until his campaign received an unexpected boost: a grand jury investigation into corruption by U.S. attorney Stan Pitkin. The feds stepped in to do what Carroll wouldn’t.

The consequence was epic—the prosecutions and reform efforts resulted in a police chief resigning, an assistant chief and a longtime King County sheriff convicted of scandal-related charges, and dozens of SPD officers charged or forced into retirement. Bayley defeated Carroll, and the century-old payoff system was ended.

One generation’s reforms do not fix everything. The Seattle police are now going through another round of having to change business as usual. It will take a media willing to bring problems into the daylight; the intervention of higher (read: federal) authorities; cooperation at the city, county, state and national levels; community reformers unwilling to accept the status quo; and officers willing to risk their careers to change an entrenched law enforcement culture.

As Chris Bayley shows in his David versus Goliath tale, to tackle systemic corruption, you need more than a slingshot. It requires a lot of help, good values and good timing.