President Trump’s effort to overturn his 2020 reelection loss has been fraught from the start. He has made baseless claims about widespread voter fraud. When faced with substantiating them in court, lawyers representing him and the Republican Party have often watered them down. But even that effort has produced almost no victories.

And as things have progressed, Trump has confronted another glaring and growing problem: keeping his legal team intact.

Over the past two weeks, three large law firms have distanced themselves from him and his claims, with two of them withdrawing from litigation altogether. One of those firms was replaced after the Trump campaign’s lawsuit was significantly narrowed in response to losing elsewhere.

The Trump campaign has also installed a lead counsel, Marc Scaringi, who said previously that Trump’s legal effort “will not reverse this election.” And this weekend, it parted ways with controversial lawyer Sidney Powell eight days after announcing she was part of the team, after she made a series of claims that apparently went too far even for Trump.

Capping it all off, Trump’s personal lawyer Rudolph W. Giuliani appeared in court for the first time in decades in what wound up being a losing effort that drew a harsh rebuke from the judge.

Below is a timeline of the drama on Trump’s legal team.

Nov. 8: Snell & Wilmer, the largest law firm representing the Trump campaign, moves to withdraw from litigation in Arizona, a day after filing its lawsuit.

Nov. 9: The New York Times reports widespread discomfort among employees of Jones Day, another large law firm that has represented Trump, who expressed concern that the firm was participating in Trump’s effort to undermine the integrity of elections.

Nov. 10: A judge allows Snell & Wilmer to withdraw.

Nov. 10: Jones Day issues a statement saying it “is not representing President Trump, his campaign, or any affiliated party in any litigation alleging voter fraud.” (Some of Trump’s lawyers have stopped short of echoing his claims of outright fraud, even as they question the legitimacy of some ballots.) Jones Day emphasizes that it is “representing the Pennsylvania GOP” and says it will not withdraw from litigation.

Nov. 12: Porter Wright Morris & Arthur, another large firm representing the Trump campaign, moves to withdraw from litigation in Pennsylvania four days after filing suit.

Nov. 13: Jones Day tells employees that it won’t get involved in additional litigation.

Nov. 13: Trump puts Giuliani in charge after the campaign’s latest setback in Maricopa County, Ariz.

Nov. 14: Trump makes Giuliani’s posting official and announces four others who will lead his team. Two of them are the husband-wife team of Joseph diGenova and Victoria Toensing, who were announced as new members of Trump’s legal team during the Russia investigation in 2018 but whose hiring was halted two days later over conflicts. The others are Sidney Powell, who most recently has served as lawyer to former Trump national security adviser Michael T. Flynn, and Jenna Ellis, the Trump campaign’s legal adviser. Both have promoted baseless allegations and suggestions of substantial voter fraud.

Nov. 15: The Trump campaign narrows its lawsuit in Pennsylvania, and Porter Wright Morris & Arthur is removed as counsel in the updated document. It is replaced by Texas lawyer John B. Scott, who joins Pennsylvania lawyer Linda A. Kerns on the case.

Nov. 16: Scott, Kerns and a third lawyer in the Pennsylvania case, Douglas Bryan Hughes, move to withdraw. The judge allows Scott and Hughes to do so but not Kerns. Pennsylvania lawyer Scaringi joins the case as lead counsel, despite having said recently on his radio show that “in my view, the litigation will not work” and that “it will not reverse this election.” Scaringi asks for a delay in a scheduled hearing the following day, saying he and a colleague “need additional time to adequately prepare.” The motion is rejected.

Nov. 17: Giuliani joins as counsel in the Pennsylvania case, appearing in court. Kerns declines an opportunity to speak, citing her request to withdraw.

Nov. 19: The judge allows Kerns to withdraw.

Nov. 22: The Trump campaign suddenly announces Powell is not part of its legal team. The move comes eight days after it introduced her as part of the team and three days after she appeared at a news conference with Giuliani in which she alleged a communist plot to rig the election and suggested even Republicans had participated in the rigging of their own elections.