WASHINGTON — The State Department has hired an alarming number of law-enforcement agents with criminal or checkered backgrounds because of a flawed hiring process, a stunning memo obtained by The Post reveals.

The background problems are severe enough that many of the roughly 2,000 agents in State’s Bureau of Diplomatic Security can play only limited roles in agency efforts to police bad conduct and prosecute wrongdoers.

The problems in the bureau are the latest revelation in an exploding scandal that also involves accusations that members of former Secretary of State Hillary Rodham Clinton’s security detail and those of the US ambassador to Belgium solicited prostitutes overseas.

A whistleblower charges that State tried to cover up multiple scandals by removing them from an inspector general’s report.

“Department intakes of new . . . officers since the hiring surge a decade ago have reportedly been flawed, with ‘mitigation’ of troubling histories including criminal matters,” according to a December 2012 memo to State Deputy Inspector General Harold Geisel from a team leader in the IG’s Office.

The memo goes on to state that the troubling backgrounds can pose a problem if the agents are needed to testify at trials to assist prosecutors.

“Too many people entering the [Diplomatic Security and Information Management] communities end up as subjects of [Special Investigation Division] investigations and HR adjudications, become Giglio-impaired and can play only limited roles thereafter,” according to the memo.

“Giglio” refers to a US Supreme Court case dealing with jury notification that witnesses have made deals with the government to induce testimony.

Some Diplomatic Security field offices “have major problems just waiting to be discovered,” the memo adds.

An IG spokesman said he couldn’t comment on internal documents, but State has said it prosecutes misconduct, and that the internal draft reports contain “unsubstantiated information.”

A 2012 letter to State’s labor-management negotiator from the union for foreign-service agents, also obtained by The Post, asserts a pattern of “questionable tactics and unprofessional conduct” by Diplomatic Security agents.

In one case, aggressive interrogation techniques by Diplomatic Service agents drove an employee to attempt suicide when accused of raping his maid in Bangkok, Thailand, the memo suggests. The employee maintained the sex was consensual.

But after “being told he would end up in a Thai prison, his wife would lose her job and his children would be pulled out of school, [the man] attempted suicide by jumping out of the 16th-story window at a hotel in Bangkok,” said the memo.

“Fortunately, he landed on a tarp on the 10th floor and sustained minor injuries.”“It depends on what team you’re on, whether they like you or not,” he said.

The man was flown back to Washington for in-patient psychiatric care, where the agents continued to harass him, the union charged. The rape charges were ultimately dropped.

The memo sites eight cases involving Diplomatic Security agents who resort to “false, misleading or incomplete statements in reports,” “privacy-act violations” or “lack of objectivity” in investigations.

Cary Schulman, lawyer for former IG investigator-turned-whistleblower Aurelia Fedenisn, said Diplomatic Security agents are “wrongfully overly pursuing some people” but letting other have a “free pass.”