A state lawmaker who is helping lead the effort to impeach Philadelphia's elected prosecutor on Tuesday became the newest candidate for Pennsylvania attorney general, an office that played a critical role in court defending Joe Biden’s 2020 victory in the presidential battleground.

Rep. Craig Williams, a Republican who represents part of suburban Philadelphia, has said for months that he planned to run for the state's top law enforcement office in 2024.

Williams, a former federal prosecutor and former U.S. Marine Corps pilot and prosecutor, is the third Republican to declare his candidacy.

REPUBLICAN LAWMAKERS FILE APPEAL REGARDING THE LEGALITY OF THE PA LEGISLATURE'S IMPEACHMENT OF LARRY KRASNER

Craig Williams in Senate chamber

Pennsylvania state House of Representatives' impeachment manager Rep. Craig Williams, reads the articles of impeachment against Philadelphia's Democratic district attorney, Larry Krasner, in the Senate chamber at the Pennsylvania Capitol in Harrisburg, Pa., on Nov. 30, 2022. Williams announced on Nov. 28, 2023, that he is running for Pennsylvania's attorney general. (AP Photo/Matt Rourke, File)

COURT REJECTS PENNSYLVANIA TOWNSHIP'S BAN OF 'THIN BLUE LINE' FLAG AS UNCONSTITUTIONAL

In an announcement video, Williams says, "I'm running for attorney general because I know how to deal with violence. ... I fought the bad guys on the battlefield and I beat them in the courtroom."

Democrats are facing a five-way primary for an office that will be open after next year.

Williams is a second-term member of the state House who ran unsuccessfully for Congress in 2008, losing by 20 percentage points to then-U.S. Rep. Joe Sestak. He spent about a decade as a lawyer for Philadelphia-area electric and gas utility Peco Energy Co., an Exelon Corp. subsidiary, before running for the Legislature.

As a freshman lawmaker, he became one of two House Republicans tapped to lead the impeachment of Philadelphia's progressive district attorney, Larry Krasner. The process is tied up in court, with Krasner challenging it as a political impeachment based on policy disagreements, not credible evidence of wrongdoing in office.

Williams, 58, born in Alabama, got his law degree at the University of Florida.

The attorney general's office has a budget of about $140 million annually and plays a prominent role in arresting drug traffickers, fighting gun trafficking, defending state laws in court and protecting consumers from predatory practices.

The office also defended the integrity of Pennsylvania’s 2020 presidential election against repeated attempts to overturn it in state and federal courts by Donald Trump’s campaign and Republican allies.

The two other Republicans who have announced their candidacies are York County District Attorney Dave Sunday and former federal prosecutor Katayoun Copeland.

The Democrats running are Delaware County District Attorney Jack Stollsteimer, state Rep. Jared Solomon of Philadelphia, former state Auditor General Eugene DePasquale, former federal prosecutor Joe Kahn and Keir Bradford-Grey, the former head of Philadelphia’s and Montgomery County’s public defense lawyers.

No Republican has been elected attorney general since 2008.

Candidates must file paperwork by Feb. 13 to appear on the April 23 primary ballot.

The current officeholder, Michelle Henry, is filling the last two years of Gov. Josh Shapiro 's second term as attorney general and doesn't plan to run for the office. Shapiro nominated Henry, his top deputy, in January when he was sworn in as governor.