Sonoma County will pay $3 million to settle the civil rights lawsuit filed by the family of Andy Lopez, a 13-year-old Santa Rosa boy who was shot and killed in 2013 by a sheriff’s deputy.

The Board of Supervisors voted 5-0 Tuesday to approve the settlement, County Counsel Bruce Goldstein announced after a closed-session meeting about the case.

The agreement brings to a close to the county’s most prominent civil rights lawsuit — over a shooting that became a searing flashpoint for police-community relations and public debate about law enforcement practices. The settlement amount is the largest paid out by Sonoma County in cases involving officer use of force, according to county figures.

The lawsuit was filed by Lopez’s parents on Nov. 4, 2013, almost two weeks after then-deputy Erick Gelhaus shot the teen, who was walking down the street carrying an airsoft BB gun that resembled an assault rifle.

The settlement did not include an admission of liability by the county in the wrongful death suit or any additional terms governing the Sonoma County Sheriff’s Office, Goldstein said.

The Lopez family’s attorney, Arnoldo Casillas, will withdraw the case from the federal court system in the near future as part of the settlement conditions, Goldstein said.

“I think both sides evaluated the risks of litigation and both sides felt like at this point, it was the best way to resolve the case,” Goldstein said. The case had been proceeding toward trial in July.

Lopez’s parents were pleased with the settlement, Casillas said, and with the lasting impact the civil rights lawsuit has had both locally and countrywide. Most notably, the lawsuit set a precedent at the U.S. Supreme Court in cases where officers use deadly force on a person with a replica gun, he said.

A petition filed by the county to the nation’s highest court in the case was rejected in June, keeping intact a lower court’s decision that indicated Lopez posed no immediate threat to Gelhaus and that a jury should decide if excessive force was used in the shooting. The county had sought immunity for Gelhaus from civil liability in the case.

“That precedent is going to be on the books forever, and for them, through that, Andy is living forever,” Casillas said in a phone interview Tuesday.

Despite those gains, the legal process has been “incredibly painful” for Andy’s parents, Sujey Cruz and Rodrigo Lopez, Casillas said. The Lopez family was not ready to make a public comment on the settlement on Tuesday, he said.

“It still doesn’t help them in a tangible way to deal with that loss,” Casillas said. “They’re going to miss Andy every day of their lives.”

The federal lawsuit alleged Gelhaus acted recklessly when he opened fire on Lopez and accused the Sonoma County Sheriff’s Office of establishing polices that were “encouraging, accommodating, or ratifying” of deputies’ use of deadly force.

The case has cost the county approximately $1.4 million in legal fees over the past 5 years, Sonoma County spokeswoman Jennifer Larocque said.

The settlement eclipses the previous high-dollar mark for the county in a case involving an officer’s use of force. The previous record stemmed from a 2015 federal lawsuit that alleged a sheriff’s SWAT team launched an unwarranted siege on the home of a Santa Rosa man that lasted close to 12 hours, leading to the man’s suicide. The county announced they would pay $1.9 million to Glenn Swindell’s family in June.

The county also paid $1.75 million to settle a lawsuit involving the March 2007 shooting death of Jeremiah Chass, 17, by sheriff’s deputies.

Sonoma County Sheriff Rob Giordano offered his condolences to the Lopez family Tuesday afternoon, reading from a prepared statement that mirrored comments he made in a Facebook video posted earlier in the day.

He said the Sheriff’s Office and county officials decided a settlement was the best solution in the federal case, one that he said stemmed from a “tragic event” involving a sheriff’s deputy and a teen carrying a BB gun that resembled a real rifle.

Giordano noted Gelhaus was cleared by the District Attorney’s Office of criminal wrongdoing in the case. He also warned people against owning replica firearms.

“The reality is that our deputy was faced with a weapon that looked like a real weapon,” Giordano said when asked about policy changes within the department since the shooting. “You can’t change that fact.”

He could not offer any specific policy changes enacted by the department as a direct result of the Lopez shooting, but he did say deputies now train with a use of force simulator that teaches them how to respond to potentially lethal situations. The department has also increased community engagement and awareness since the shooting, a change from the office’s response after Lopez died, he said.

Both the Sheriff’s Office and the Santa Rosa Police Department adopted the use of body-worn cameras on their sworn personnel in the aftermath of shooting. The county and Santa Rosa also created independent oversight programs for internal investigations into police shootings, use of force and complaints. The county’s program is an independent office; Santa Rosa’s is a contracted auditor.

Gelhaus, a 24-year veteran of the Sheriff’s Office at the time of the shooting, was promoted to sergeant in 2016 and now oversees patrol on swing shifts, Giordano said. Gelhaus did not return a request for comment sent to his work email Tuesday afternoon.

The shooting happened Oct. 22, 2013 as Lopez was walking on Moorland Avenue, located on Santa Rosa’s southwestern outskirts.

Gelhaus, a firearms expert and Iraq War veteran, was partnered that day with a deputy he had supervised for a month, a new hire with 11 years of experience. Just after 3:14 p.m., they drove up behind Lopez about a half-mile north of the boy’s Moorland Avenue home.

Ten seconds later, after the deputies had reported a suspicious person to dispatchers, radioed for backup and issued orders to the boy to drop his weapon, according to Santa Rosa police, Gelhaus opened fire when he saw Lopez — his back to the deputies — begin to turn toward him, the barrel of the BB gun rising.

Gelhaus fired eight rounds at the boy. Lopez was struck seven times and died at the scene. The other deputy, Michael Schemmel, who had joined the Sonoma County Sheriff’s Office only a month earlier, did not fire his weapon.

Gelhaus told police investigators he thought Lopez was carrying a real assault rifle and that he feared for his life when the boy began to turn towards him.

Lawyers on both sides argued about whether the way the barrel of Lopez’s BB gun raised as he turned toward Gelhaus could be considered an imminent threat to officers.

A five-month investigation by District Attorney Jill Ravitch’s office determined the shooting was lawful, a July 2014 determination that rekindled the vocal protests and raw emotions unleashed after the shooting.

“Deputy Gelhaus was faced with a highly unpredictable and rapidly evolving situation,” Ravitch said at the time. “Given his training and experience, he believed honestly and reasonably that he was faced with a do-or-die dilemma.”

While the settlement closes the door on the legal battle between the Lopez family and the county, the tumultuous aftermath of the shooting is a painful memory for many, Supervisor James Gore said.

“Andy’s tragic death five years ago was a heartbreaking moment for the entire community,” Gore said. “This settlement today is a moment to move forward in the healing process.”

A $3.7 million park in Lopez’s memory was built at the vacant lot where the teen was killed. It opened in June.

Ana Salgado, a Santa Rosa resident who became a key community activist in the aftermath of the Lopez shooting, said she was surprised by the news of the settlement given how close the case was to going to trial. She’s stayed in touch with Lopez’s parents in the years that followed.

“I know it wasn’t easy to come to all this after 5 years,” Salgado said “They’ve suffered and the community has suffered too.”

The fatal shooting brought much of the Latino community together and served as a platform for local youth to voice their opinions, she said.

“This case was a call for action,” Salgado said.

You can reach Staff Writer Nashelly Chavez at 707-521-5203 or nashelly.chavez@pressdemocrat.com. On Twitter @nashellytweets.