Federal watchdogs on Thursday announced a wide-ranging investigation into how the Justice Department and FBI handled the probe into Hillary Clinton’s private e-mail server leading up to the presidential election.

Department Inspector General Michael Horowitz said the investigation would look at whether Justice and the FBI followed their own policies, and also at FBI Director James Comey’s public statements about the probe, which infuriated many Democrats.

Comey announced on July 5 that he would not recommend criminal charges against Clinton, even though he said that she and her staffers acted “extremely carelessly” when they used her private e-mail server to conduct sensitive State Department business.

He then sent a letter to Congress on Oct. 28 in which he said he was reopening the probe because of newly discovered ­e-mails to and from Clinton aide Huma Abedin on hubby Anthony Weiner’s laptop during a probe into Weiner’s sexting scandal involving a teenage girl.

Then, on Nov. 6 — two days before the election — he announced there would be no further charges. The Clinton campaign cried foul, saying the timing of the announcements could have contributed to Donald Trump’s narrow victory.

The IG also will investigate whether the work of an FBI deputy director whose wife received financial support in her state election from a close Clinton ally was appropriate and whether the Department of Justice’s assistant attorney general, who was close to Clinton campaign chair John Podesta, should have been recused from matters.

Additionally, Horowitz said he’ll be examining allegations of FBI leaks.

Horowitz said the review came in response to multiple requests from ranking members of Congress.

Ex-Clinton campaign spokesman Brian Fallon, appearing on MSNBC, called the move “entirely appropriate and very necessary, but also not surprising.”

Comey said he welcomed the review.

“I hope very much he is able to share his conclusions and observations with the public because everyone will benefit from thoughtful evaluation and transparency regarding this matter,” he said of Horowitz in a statement.

Team Trump did not immediately respond to a request for comment.

The next president will have the power to quash the probe by dismissing Horowitz under a precedent set by President Obama.

In 2009, Obama canned an internal watchdog because, according to the White House, the man was incompetent and had been behaving bizarrely.

With Post Wires