The former special counsel Robert Mueller laid out two clear reasons on Wednesday for why he investigated President Donald Trump even though he knew he could not charge him with a crime.

First, even though Department of Justice policy says a sitting president cannot be indicted, Mueller said he investigated Trump in order to preserve documentary evidence and witness testimony.

Second, Mueller said DOJ policy "says that the Constitution requires a process other than the criminal justice system to formally accuse a sitting president of wrongdoing."

In other words, Mueller left the door open to two possibilities that should worry Trump: criminal prosecution once he leaves office and a congressional impeachment proceeding.

Visit Business Insider's homepage for more stories.

The former special counsel Robert Mueller said Wednesday that he did not consider charging President Donald Trump with a crime because of a longstanding Department of Justice Office of Legal Counsel (OLC) policy that says a sitting president cannot be indicted.

But Mueller laid out why he still spent two years investigating Trump despite knowing he could never charge him for criminal conduct.

Making his first public statement since he took over as special counsel, Mueller listed two reasons in particular that he went ahead with the investigation.

Mueller leaves the door open to Trump being prosecuted after leaving office

First, the OLC opinion "explicitly permits the investigation of a sitting president because it is important to preserve evidence while memories are fresh and documents are available," Mueller said.

That evidence could be used for other matters, such as determining whether there were coconspirators to a crime who could now be charged.

Read more: The chairman of the powerful House Judiciary Committee just went as far as he could to say Trump should be impeached, without saying it outright

"The OLC opinion also recognizes that a President does not have immunity after he leaves office," Mueller's team said in its report, which was released with light redactions last month. "Given those considerations, the facts known to us, and the strong public interest in safeguarding the integrity of the criminal justice system, we conducted a thorough factual investigation in order to preserve the evidence when memories were fresh and documentary materials were available."

Mueller alludes to impeachment

Second, Mueller said on Wednesday, "the opinion says that the Constitution requires a process other than the criminal justice system to formally accuse a sitting president of wrongdoing."

In other words, Mueller investigated Trump to preserve evidence — which leaves the door open to criminal prosecution once Trump leaves office — and to inform a potential impeachment proceeding against Trump.

The former FBI director emphasized clearly that the reason prosecutors didn't consider charging Trump was because of the OLC opinion, and not because of a lack of evidence against him.

Read more: Read Mueller's first public statement on the results of the Trump-Russia investigation

Indeed, Mueller's team laid out an extensive road map of evidence against Trump in the obstruction case in their final report, highlighting 11 potential instances of obstruction of justice by the president.

But "under longstanding department policy, a president cannot be charged with a federal crime while he is in office," Mueller said. "Even if the charge is kept under seal and hidden from public view, that, too, is prohibited."

He added, "Charging the president with a crime was therefore not an option we could consider."

Critically, he reiterated his final report in the investigation and added, "If we had confidence that the president clearly did not commit a crime, we would have said so."