There was a time when Upland-based Lackie, Dammeier, McGill & Ethir was one of the most powerful police law firms in California, employing bare-knuckled tactics that earned big pay raises for officers.

But the now-defunct firm might have met its match in Costa Mesa. After five years of legal wrangling, the law firm has agreed to pay $607,500 to settle a civil suit alleging it illegally had a tracking device placed on a former mayor’s personal vehicle. The firm also was accused of having a private investigator falsely claim a council member was driving drunk.

The suit was filed by former Costa Mesa Mayor Steve Mensinger, current Councilman Jim Righeimer and his wife, Lene. Their attorney, Vince Finaldi, said on Monday his clients had accomplished the mission they set out to achieve when the suit was filed in 2013.

“They wanted accountability. They wanted to shine the light on the subject and bring public attention to the fact (the police workers) were using these tactics,” Finaldi said. “What they did was horrible, horrible.”

Righeimer added: “Sometimes, in life, its necessary to take a stand against bullies who engage in fraud and misconduct. It’s especially sad when it is a few bad apples in law enforcement ‘casting’ a bad light on all the great hard-working men and women in our police department.”

Under the agreement, Lackie, Dammeier will pay $600,000. The Costa Mesa police union, which hired the law firm, will pay another $7,500, with money it is receiving from the rogue law firm.

Stephen Larson, the attorney for Lackie, Dammeier, said the settlement is not an admission of guilt.

“Without any finding of liability or recognition of wrongdoing by anyone, the law firm LDME and its insurance carrier agreed to a monetary settlement of all the claims and counterclaims … to bring an end to the absurd political theater that has characterized this case and its baseless allegations from the beginning,” Larson wrote in a statement.

Seymour Everett, attorney for the police union, said the Costa Mesa Police Association was a victim of the law firm, but nevertheless targeted in the suit by Righeimer and Mensinger.

“This lawsuit should never have been filed against the police association. The CMPA did not have knowledge of the private investigator and did not direct or influence the private investigator,” Everett said. “When the CMPA learned of the incident, the CMPA immediately fired the law firm and worked closely with the city and District Attorney’s Office.”

Last year, one of Dammeier’s investigators, fired Riverside police Detective Christopher Lanzillo, was sentenced to a year in jail after pleading guilty to the Costa Mesa charges. A second investigator died of natural causes before his trial. No criminal charges were filed against any attorneys or current police officers.

The end for Lackie, Dammeier began when the Orange County Register published excerpts in 2012 of the firm’s online guide to manipulating city officials.

The firm advised police unions to target a city official for unflattering publicity until that official pledged allegiance — then move to the next one. The playbook also advised unions to convince the public that high salaries were tied to the degree of public safety.

Within days, the firm’s private investigator, Lanzillo, followed Righeimer home from a tavern owned by another ex-council member and phoned in a DUI report to police. Officers arrived and had Righeimer perform a field sobriety test on his front lawn. Righeimer produced receipts showing he had consumed only two diet colas.

Righeimer’s wife, Lene, later accused Lanzillo of trying to run her over as he sped from the scene.

The DUI incident triggered investigations by the Orange County District Attorney’s Office as well as the FBI, as allegations of bullying flowed in from other Southern California cities. One El Monte city manager, who was immersed in police negotiations, alleged that he was being followed by Lackie, Dammeier’s investigator. An Upland city manager was arrested on charges of perjury and personally benefiting from his relationship with attorney Dieter Dammeier and his firm.

Meanwhile, Lackie, Dammeier lost one of its largest clients, the Peace Officers Research Association of California, and its 99,000 members. A forensic audit for the association uncovered triple-billing, bogus travel expenses and “serious acts of misconduct” by Lackie, Dammeier.

The law firm imploded, but not before Orange County investigators discovered that Lanzillo and another private investigator hired by Lackie, Dammeier had placed an electronic GPS device on then-Mayor Mensinger’s car. The vehicle had been parked in his driveway. It also was discovered that investigators wired an attractive woman and sent her into a bar in an attempt to catch a Costa Mesa councilman in a compromised position.

“The law firm has been exposed. They’ve gone under and scattered to the wind,” Finaldi said. “They are no longer engaging in these types of tactics.”