The Justice Department should consider prosecuting former FBI director James B. Comey for actions that “were improper and likely could have been illegal,” White House press secretary Sarah Huckabee Sanders said Tuesday.

“I think if there's ever a moment where we feel someone's broken the law, particularly if they're the head of the FBI, I think that's something that certainly should be looked at,” Sanders said.

She said that recommending such a prosecution is “not the president's role,” and that the White House is not encouraging it.

“That's the job of the Department of Justice, and something they should certainly look at,” Sanders said.

Asked to clarify, Sanders said this:

“Anybody that breaks the law, whatever that process is that needs to be followed, should certainly be looked at,” Sanders said. “If they determine that that's the course of action to take, then they should certainly do that, but I'm not here to ever direct DOJ in — in the actions that they should take.”

“The president is proud of the decision that he made. The president was 100 percent right in firing James Comey. He knew at the time that it could be bad for him politically, but he also knew and felt he had an obligation to do what was right, and do what was right for the American people, and certainly the men and women at the FBI,” Sanders said at a White House press briefing.

“I think there's no secret. Comey, by his own self-admission, leaked privileged government information weeks before President Trump fired him. Comey testified that if an FBI agent engaged in the same practice, they'd face serious repercussions,” Sanders continued. “I think he set his own stage for himself on that front. His actions were improper, and likely could have been illegal.”

Comey leaked memos to the New York Times, and “politicized an investigation by signaling he would exonerate Hillary Clinton before he ever interviewed her or other key witnesses,” Sanders added. She also asserted that Comey had given false testimony to Congress.

Trump has complained that Comey let Clinton off the hook last year when the FBI closed an investigation into the handling of classified information on the private email server Clinton used as secretary of state. Comey said Clinton had been sloppy, but had not acted criminally. The announcement came days after Clinton was interviewed by the FBI, and Comey critics have alleged that he had already decided to shutter the investigation before going through the formality of interviewing her.

Comey has maintained that he acted lawfully in preserving notes from meetings with Trump that he testified had made him uncomfortable, and acknowledged that he allowed accounts of the meetings drawn from those notes to become public.

A Justice Department spokeswoman declined to comment. A lawyer for Comey did not immediately comment.

Sanders' comments left unclear what federal law she thought the former FBI director might have violated. She mentioned the disclosure of a memo by Comey to a law professor friend, but at the time that it happened, the memo was not classified.

She also cited his apparent preparation of remarks explaining his decision not to charge anyone in the case months before that decision was announced, and before Clinton herself had been interviewed about the matter. It was unclear from Sanders' comments what about that conduct might constitute a crime.

Reporters had asked Sanders about comments from former chief strategist Stephen K. Bannon, who told "60 Minutes” that canning Comey may have been the worst political mistake in “modern political history,” since it led to the creation of a special counsel to investigate potential ties between Russia and Trump's campaign.