Challenger Mary Robnett has been elected Pierce County prosecutor over incumbent Mark Lindquist, seeking his third term.

Robnett worked in the prosecutor’s office for 18 years before running for the title.

"I’m just so gratified," Robnett said. "I feel really happy that the race turned out the way it did."

Robnett had 63.2 percent of the overall vote as of Thursday evening.

RELATED: Track election results

Lindquist was appointed to the position by the Pierce County Council in 2009 and was re-elected to the position twice.

"Serving as your Prosecutor has been one of the true privileges of my life," Lindquist said in a statement on election night. "Nine years ago I promised to help make our community safer. We’ve done that. We’ve protected elders, reduced gang violence, improved therapeutic courts, and cultivated a public service culture. I appreciate all the support our office and my family and I received from good people in the community. Our family is grateful. Thank you."

Robnett said in an interview in February she’s running against Lindquist, because she was “disappointed” in the way he ran the office.

Lindquist has faced accusations of retaliation and prosecutorial misconduct. In March, a judge ruled Lindquist violated the Public Records Act by not releasing text messages related to a sabotage investigation.

"My pledge throughout has been to really restore the professionalism, restore the focus on public service in that office, and to be a prosecutor who’s tough, honest, ethical, and fair, and that’s what I want to do," Robnett said.

Robnett upset Lindquist in the primary, capturing about 55.6 percent of the vote.