The two federal criminal cases against former President Donald J. Trump sputtered back to life this week after periods of delay and major legal setbacks.

With 10 weeks left until Election Day, prosecutors in the office of the special counsel, Jack Smith, filed an appeal on Monday of Judge Aileen M. Cannon’s ruling last month dismissing the indictment that accused Mr. Trump of mishandling classified documents after leaving office and obstructing the government’s repeated efforts to retrieve them.

Then on Tuesday, Mr. Smith took action in a second case, in which Mr. Trump stands accused of plotting to overturn the 2020 election. Prosecutors filed a pared-down version of their original indictment that sought to maintain the bulk of the election charges against Mr. Trump while also bringing them into line with the Supreme Court’s recent ruling granting broad immunity to former presidents for official acts they took in office.

Neither of the cases the special counsel is overseeing will go to trial before Election Day, and if Mr. Trump regains the White House in November, he will have the power to fire Mr. Smith and have both of the proceedings put to rest altogether. Still, Mr. Smith appears intent on aggressively pursuing the cases even as the campaign enters its homestretch, and has signaled that he will keep pushing them forward even up to Inauguration Day if Mr. Trump wins the election.

Here is how the two prosecutions have gotten to this point of remaining alive but still being mired in legal and political uncertainty.

Until a few weeks ago, Mr. Trump’s election case had been on hold for nearly eight months, with all proceedings frozen, as a series of federal courts — including the Supreme Court — considered his claims to be immune from prosecution on any charges arising from his official acts as president.