The Department of Justice's independent watchdog, the inspector general, released a report Thursday that is critical of my decisions as FBI director during the investigation of Hillary Clinton's e-mail account. The report concludes that I was wrong to announce the FBI's completion of the investigation without coordinating with the attorney general and that I was wrong to inform Congress in late October 2016 that we had reopened the investigation.

In both situations, the inspector general's team concludes, I should have adhered to established norms, which it sees as mandating deference to the attorney general on the public announcement and silence about an investigation so close to an election.

I do not agree with all of the inspector general's conclusions, but I respect the work of his office and salute its professionalism. All of our leaders need to understand that accountability and transparency are essential to the functioning of our democracy, even when it involves criticism.

This report is important for two reasons. First, the inspector general's team went through the FBI's work with a microscope and found no evidence that bias or improper motivation affected the investigation, which I know was done competently, honestly and independently. The report also resoundingly demonstrates that there was no prosecutable case against Mrs. Clinton, as we had concluded. Although that probably will not stop some from continuing to claim the opposite is true, this independent assessment will be useful to thoughtful people and an important contribution to the historical record.

Second, this report is vital in shedding light for future leaders on the nature and quality of our investigation and the decisions we made. In 2016, my team faced an extraordinary situation offering no good choices and presenting some of the hardest decisions I ever had to make. We knew that reasonable people might choose to do things differently and that a future independent reviewer might not see things the way we did. Yet I always believed that an inspector general report would be crucial to understanding and evaluating our actions.

After Attorney General Loretta Lynch announced that she would not recuse herself from the Clinton e-mail investigation and would instead rely primarily on my recommendation, I chose to do something unprecedented: In July 2016, I separately and transparently announced to the American people what we had done, what we had found and our view that Mrs. Clinton should not be prosecuted. Before 2016, I could never have imagined doing such a thing, because the normal practice was always for the FBI director to coordinate statements with the attorney general and for leaders of the Justice Department to report the details of the completed investigation.

But even in hindsight I think we chose the course most consistent with institutional values. An announcement at that point by the attorney general, especially one without the transparency our traditions permitted, would have done corrosive damage to public faith in the investigation and the institutions of justice. As painful as the whole experience has been, I still believe that. And nothing in the inspector general's report makes me think we did the wrong thing.

Similarly, I never imagined the FBI would face a choice in late October 2016 either to tell Congress we had restarted the e-mail investigation in a significant way or to conceal that fact. But to have concealed it would have meant to hide vital information: that what I and others had said publicly and under oath to Congress was no longer true. I chose to speak and tell the truth.

I was not certain I was right about those things at the time. That's the nature of hard decisions; they don't allow for certainty. With the added benefit of hindsight, the inspector general sees some things differently. My team believed the damage of concealing the reopening of our investigation would have been catastrophic to the institution. The inspector general weighs it differently, and that's OK, even though I respectfully disagree.

I encouraged this intensive review when I was FBI director and continued to support its work after I was fired. The report's conclusions are important. But the real, historical value of the review is its collection of facts. If a future FBI leadership team ever faces a similar situation — something I pray never happens — it will have the benefit of this important document.

This is what institutions devoted to the rule of law and accountability look like. They look back at their hardest decisions and collect the facts, and are transparent about those facts and decisions. The leaders of those institutions are best served by welcoming that oversight and that process of second-guessing. That's why I urged the investigation in the first place. As FBI director, I wanted a second set of eyes on the agonizing decisions we made. I also was confident that even if the inspector general's office disagreed with our decisions, it would find the FBI team made them without regard for political favor or partisanship.

The office has now reached that very conclusion. Its report should serve to both protect and build the reservoir of trust and credibility necessary for the Justice Department and FBI to remain strong and independent and continue their good work for our country. Our institutions of justice are up to the task of protecting the rule of law and defending truth and transparency. All of us should stand up and support them.

James Comey is former FBI director and author of "A Higher Loyalty: Truth, Lies, and Leadership." He wrote this article for the New York Times.