WASHINGTON—Special counsel Jack Smith defended his decision to bring charges against Donald Trump over his efforts to overturn his 2020 election loss, writing in a report made public early Tuesday that prosecutors believed they had enough evidence to convict him had they not been forced to drop the case after his re-election in November.

“Indeed, but for Mr. Trump’s election and imminent return to the Presidency, the Office assessed that the admissible evidence was sufficient to obtain and sustain a conviction at trial,” Smith wrote in the  174-page report , the release of which marks the end of an unprecedented chapter in U.S. history.

Smith  dismissed the federal election-interference case  and one alleging Trump unlawfully retained classified documents, citing longstanding Justice Department policy prohibiting the prosecution of a sitting president.

“While we were not able to bring the cases we charged to trial, I believe the fact that our team stood up for the rule of law matters,” Smith wrote in the report, which Attorney General Merrick Garland sent to Congress just before 1 a.m. Tuesday, shortly after a court order barring its disclosure expired. “The facts, as we uncovered them in our investigation and as set forth in my Report, matter. Experienced prosecutors know that you cannot control outcomes, you can only do your job the right way for the right reasons,” Smith said.

Although many of the details in the report have been previously revealed, the document represents the most detailed assessment to date of the decision-making by Smith’s team leading up to the unprecedented move to federally charge a former president. Its release less than a week before Trump is set to return to the White House further infuriated the president-elect, who repeatedly attacked the prosecutions as a politically motivated effort to derail his candidacy.

In a pair of posts on Truth Social early Tuesday, Trump called Smith’s decision to release what he called “fake findings” at 1 a.m. “deranged,” and called Smith a “lamebrain prosecutor who was unable to get his case tried before the Election.”

Smith resigned from the Justice Department last week. After days of legal wrangling, U.S. District Judge Aileen Cannon allowed the Justice Department to release the election-interference portion of Smith’s report. But she barred officials from immediately making public a second volume dealing with the classified-documents case, which she oversaw, as criminal proceedings against two of Trump’s co-defendants are under way.

In his report, Smith pushed back on Trump’s repeated claims that the investigations were politicized.

“I can assure you that neither I nor the prosecutors on my team would have tolerated or taken part in any action by our Office for partisan political purposes,” he wrote.

“Throughout my service as Special Counsel, seeking to influence the election one way or the other, or seeking to interfere in its outcome, played no role in our work. My Office had one north star: to follow the facts and law wherever they led. Nothing more and nothing less.”

Smith’s election-interference case, originally filed in August 2023 , was arguably the most ambitious of all the prosecutions. His team outlined sweeping allegations that Trump pulled the levers of power to pressure state officials, and then-Vice President Mike Pence and the Justice Department, to advance his baseless claims of election fraud and help him remain in power, in a chain of events that culminated in the Jan. 6, 2021, attack on the Capitol by Trump supporters.

In his report, Smith blamed the violence of that day squarely on Trump, who he said “engaged in an unprecedented criminal effort to overturn the legitimate results of the election in order to retain power.”

He also described the legal challenges his team faced as it entered uncharted terrain in prosecuting a former president while he sought re-election, from fights over executive privilege and immunity to concerns about protecting witnesses from threats and harassment.

“Given the timing and circumstances of the Special Counsel’s appointment and the Office’s work, it was unavoidable that the regular processes of the criminal law and the judicial system would run parallel to the election campaign,” Smith wrote.

The Supreme Court’s July decision that presidents enjoy sweeping immunity for actions they take while in office dealt a significant blow to the special counsel’s work, but Smith held his ground with a reworked indictment that left in place the same charges Trump originally faced. It landed at the height of campaign season, fueling Trump’s criticism of Smith, whom he vowed to fire “within two seconds” of taking office.

Trump’s nominees to lead the Justice Department have been openly critical of Smith’s work and have suggested they would investigate or even seek to prosecute him and members of his team. Some of those prosecutors have sought legal guidance from friends and private lawyers in anticipation of how the next Trump administration could make their lives difficult whether or not they leave the government, from potential harassment to investigations that could hurt them legally and financially for years, The Wall Street Journal has reported .

Write to Sadie Gurman at sadie.gurman@wsj.com