Former Montgomery County District Attorney Bruce L. Castor Jr. will lead former President Donald Trump’s defense team as his second Senate impeachment trial gets underway next week.

Trump made the announcement — saying Castor will work alongside a new colead counsel, Alabama criminal defense lawyer David Schoen — in a statement issued late Sunday night. He lauded the new team for the significant “national profiles and significant trial experience” they will bring to his defense.

The decision came a day after it was disclosed that the former president had parted ways with his team of previous lawyers just days before the proceedings were set to begin, in a falling out over strategy.

In Castor — who made his name in the 2000s as Montgomery County’s telegenic, hard-charging top prosecutor only to see his status as a rising Republican star dim after a fractious stint in county government, a brief tenure as Pennsylvania’s acting attorney general, a failed 2015 bid to reclaim his old district attorney post, and a chastening moment as a star defense witness in Bill Cosby’s sexual assault trial — Trump is likely to find a defender who shares his penchant for theatrics.

One who once threatened that reporters who dared show up at his home uninvited would be met by his wife — and her gun. And one who still harbors bitter feelings after his own brush with what he once described as the “will of the voters being overturned” out from under him.

After his 2007 election to the Montgomery County’s Board of Commissioners when the board’s two other members — Democrat Joe Hoeffel and Republican Jim Matthews, brother of former Hardball host Chris Matthews — forged a power-sharing agreement to keep Castor sidelined, he expressed his discontent by inviting visitors to observe that he’d hung his certificate of public office over his toilet.

Castor, 59, of Lower Salford, did not return calls or e-mails seeking comment Sunday evening. He said in a statement that he considered it a “privilege to represent the 45th president.”

“The strength of our Constitution is about to be tested like never before in our history,” he said. “It is strong and resilient — a document written for the ages, and it will triumph over partisanship yet again, and always.”

And as he prepares to defend the first president in American history to ever face impeachment twice, Castor will need to draw upon his nearly 40 years of considerable experience in law, politics and the public arena.

» READ MORE: Castor looks back at 30 years in government

In a 2015 interview, he described his own rise through the ranks of the Montgomery County District Attorney’s Office as “meteoric.” Less than a year after he was hired there in 1985, he was serving as second chair in a double death-penalty murder case.

Elected to lead the office in 1999, he used the platform for the next eight years to make himself a regular feature on TV newscasts as he oversaw high-profile murder prosecutions. Among them: Caleb Fairley, convicted of killing a woman and her baby; Guy Sileo Jr., convicted of shooting his business partner in Lower Merion’s General Wayne Inn; Rafael Robb, a University of Pennsylvania professor who pleaded guilty to bludgeoning his wife.

That public stature carried Castor to higher posts on the county commissioner’s board for an eight-year stint marked by continuous feuding with Hoeffel and Matthews, then better relations with his counterparts once they were replaced by Democrats Josh Shapiro and Leslie S. Richards. But throughout the period, Castor had his eye on even higher posts, including a 2004 run for attorney general and a brief period when he flirted with a run for governor.

But it was the one case Castor declined to prosecute during his days as DA that would come back to haunt him later in life.

In 2005, when Andrea Constand, an operations manager with Temple University, came forward to accuse the comedian Cosby of drugging and sexually assaulting her at his Cheltenham mansion, Castor declined to prosecute.

Called as a defense witness when Cosby was eventually tried for that crime a decade later, Castor testified that he didn’t believe Constand would stand up to scrutiny as a witness at trial and declared that he had struck a secret agreement with Cosby at the time that foreclosed any future prosecutions.

» READ MORE: Cosby case could rise or fall on 'Bruce's word'

That came as news to District Attorney Kevin R. Steele, who had defeated Castor in a bitter battle for the DA’s seat just months before charging Cosby in 2015 and balked at his rival’s assertions on the witness stand.

Castor’s story also failed to convince Montgomery County Judge Steven T. O’Neill, who presided over the case and found that with no written agreement and only the former prosecutor’s testimony to go by, the deal — if it ever existed — had no binding force preventing Cosby’s trial. Ultimately, O’Neill wrote that he found Castor’s testimony to be uncredible and marked by “numerous inconsistencies in his testimony.”

Castor went on to sue Constand for defamation, a case later thrown out by a judge.

Since then, he has worked in private practice at the Center City law firm Van der Veen, O’Neill, Hartshorn and Levin — which sued Trump last year over changes to the postal service it said “raised concerns that mail-in ballots in the upcoming election could go uncounted.”

But his past steps into the limelight will be nothing compared to the glare Castor will find himself in once Trump’s Senate trial begins Feb. 9.

Republicans had been expected to argue that the former president’s trial is unconstitutional because he is no longer in office, though legal scholars have maintained that is no bar to an impeachment trial.

The Washington Post reported Sunday that Trump’s falling out with his previous legal team centered on their unwillingness to pursue a different strategy that would continue to focus on his baseless claims that his reelection was stolen out from under him by widespread and systemic fraud.

It remains to be seen which strategy Castor will bring with him to Washington later this month.