Last week, Stacy Parks Miller, the district attorney of Centre County, Pennsylvania, announced charges against 18 people for the death of Tim Piazza, a student at Pennsylvania State University who died in February during fraternity hazing. Posing with Piazza’s parents and a blown-up photo of the smiling young man, Parks Miller announced the charges of involuntary manslaughter in the horrific case, which includes a video depicting a bunch of frat guys ignoring their pledge’s slow death. It’s the perfect case for a prosecutor, especially one seeking re-election: There’s a sympathetic victim, a mourning family, and if you ask Parks Miller, a frat house full of diabolical teens.

It’s hard to fault her for coming down hard on a bunch of bros who let their friend die. But the case is not being pursued in a vacuum—Parks Miller is also currently facing a hotly contested election for her third term as the district attorney. And her reputation is increasingly defined by scandal, deceit, and revenge: She’s crossed ethical and possibly legal lines by doing things like faking a Facebook account to catfish defendants, texting a judge during a trial, and ordering a staffer to forge a judge’s signature. But Parks Miller has also made national news with the Piazza case, and when she appeared on the Today Show last week to discuss it, there wasn’t a single mention of her past misdeeds.

All in all, it seems likely that Parks Miller’s attention to this case may not only be due to her unbending commitment to justice, but also because it’s a good opportunity to quickly polish her image before Tuesday’s primary. That she’s even able to run again at all is an indication of how hard it is to hold prosecutors accountable for their blunders. Although prosecutors can be held criminally liable for breaking the law, the justice system is poorly designed to investigate, much less charge, prosecutors when they behave unethically. The same holds true for state bar associations that regulate lawyer conduct. It is rare to see a head or assistant prosecutor disciplined for questionable or blatantly unethical conduct.

One of Parks Miller’s stunts was creating a fake Facebook account of a cleavage-baring Penn State student named Britney Bella in an ethically dubious attempt to spy on several defendants facing charges; the extent of the subterfuge is still largely unknown. “All, I have made a (F)acebook page that is fake for us to befriend people and snoop,” Parks Miller wrote an email to her staff in 2011. Her name is Britney Bella. … Please edit it, post things occasionally to keep it looking legit, like things, add things and add friends … Use it to befriend defendants or witnesses if you want to snoop.” After a local news site reported that the Britney Bella page had been used for at least three years, it was quickly taken down.

Defense attorneys in Centre County have said that their clients received friend requests from Britney Bella and believe that it was a ploy by Parks Miller to gain personal and otherwise unobtainable information through surreptitious methods. Parks Miller has not denied using the account. “[H]ow else would we get to child molesters, child pornographers and drug dealers on line,” she wrote in an email to local news site Billy Penn.

Her on-call defense attorney, a former district attorney named Bruce Castor, said in a public statement that catfishing was nothing more than good old-fashioned police work: “Think about it in terms you see every day: We let our officers grow long hair and mustaches and beards, and they don’t come in and say, ‘I’m detective so-and-so.’ They say they’re someone else. They’re misrepresenting themselves.”

Contrary to Castor’s statement, the Pennsylvania Bar Association released a 2014 opinion that pretending to be someone else on Facebook was an ethics violation. In 2009, the Philadelphia Bar Association’s Professional Guidance Committee essentially said the same thing. And an assistant district attorney was fired for similar behavior in 2013 in Ohio. Yet, there’s been no substantive investigation into the impact the Bella account had on criminal defendants, although at least one defendant attorney raised the issue in requesting a new trial, saying his case was tainted because Parks Miller used the Facebook page to contact his client.

In another situation, in 2014, a paralegal came forward and said that Parks Miller had ordered her to forge a judge’s signature on a fake bail order for an informant in a murder plot against an assistant district attorney. This prompted an investigation by the Office of the Attorney General, and ultimately no charges were filed against Parks Miller. However, the lack of charges was recommended by former Pennsylvania Attorney General Kathleen Kane, who is morally compromised herself: In late 2016, she was disbarred and sent to prison for perjury and abuse of office.

It didn’t stop there. As part of the investigation into her possible misconduct, authorities seized computers and other documents from her office. In response, Parks Miller shot off a defamation lawsuit against a dozen entities, including Centre County itself, the former paralegal, government employees who investigated her, defense attorneys who opposed her in court, and defense attorney Bernard Cantorna, her opponent in the upcoming election. The judge dismissed her case, calling the lawsuit “inartfully” framed and “spiked with vitriol.” The paralegal then filed her own lawsuit against Parks Miller alleging that Parks Miller had retaliated against her and made various statements designed to defame and intimidate her, like calling her a “felon.”

Castor represented Parks Miller in the defamation lawsuit, too, which was dismissed on Thursday for failing to make an actionable claim; the judge called it “quite evidently an irrepealably flawed pleading.” Despite Castor acting as her personal lawyer, Parks Miller has also hired him to be a special prosecutor for high-profile cases even though it would seem this presents clear conflict of interest. Caster also defended Parks Miller against charges that she was texting a judge during trial, as well as in her lawsuit against the county, which takes them to task for releasing her phone records as pursuant to state information requests.

The text message case alleges that there are an unknown number of cases where she was texting Judge Bradley Lunsford, who retired in 2015 after allegations of impropriety surfaced. In a 2014 affidavit, a court reporter testified that Lunsford told her that he and Parks Miller were exchanging texts throughout a homicide trial; Lunsford had complained that Parks Miller was “bitching to him” about his rulings on objections. In another felony trial, Parks Miller and the judge exchanged more that 150 text messages; the contents of those are unknown.

Parks Miller has yet to acknowledge any wrongdoing, instead defending herself and insisting that people are after her. In a statement given to the Centre Daily in March, she said, “Bottom line — Centre County has an independent woman DA and an office that gets the right results. They don’t like it. Get over it. Really. This is 2017.” (Parks Miller did not reply to requests for comment for this article.)

Her constituents don’t seem to be over it. For the May 16 primary election, many grass-roots groups have mobilized to block her re-election, arguing that she is unethical, dishonest, and overpunitive. Her tactic on punishment stands in contrast to a growing movement over the last year to rethink the mass incarceration model as a way to fight drug crimes. Consider this example: Lizzie Smeltzer died in 2014 of a heroin overdose in 2014; at the time she was with a male friend, Ryan Kemp. Parks Miller charged Kemp with “delivery of drugs leading to death,” a first-degree felony carrying a potential 40-year sentence. The Smeltzers repeatedly asked for leniency, believing that their daughter was the victim of addiction, not malice. Though Kemp had provided drugs to Lizzie, after she became unconscious Kemp, described as “an addict who liked a girl,” called 911 for help.

At sentencing, the Smeltzer family and experts requested leniency for Kemp. Lizzie’s father, Ken Smeltzer, described the charges as “a catch-all offense that gives prosecutors enormous power.” Her mother, Bonnie Smeltzer, asked for “restorative justice” and emphasized that Ryan should receive “help for a productive life.” Instead, Kemp was given four to 12 years in prison. Parks Miller’s actions in this case seem to stand in contrast with her own promotional materials for the election, in which she claims to care about “treating the addicts.”

Last week, Parks Miller had a preliminary hearing in another overdose case—that of Corinne Pena, who was found dead in February 2016 on the side of the road. Parks Miller charged two women with “delivery of drugs resulting in death,” one with a lighter charge as an accomplice and the other with harsher charges that mean she could face a life sentence.

Attorneys have filed dozens of complaints against her with the Disciplinary Board of the Supreme Court of Pennsylvania, but the board has not ruled on any of them, and no formal action has been taken. It’s difficult to prove misconduct against elected prosecutors.

On Tuesday, Parks Miller faces off against Cantorna in the Democratic primary. It’s a critical election for criminal justice reform advocates in Centre County, but it’s not unheard of for prosecutors—even corrupt ones—to be elected again and again because they are tough on crime. For those who disapprove of Parks Miller’s conduct, Tuesday might be their only opportunity to get her out of office.