The State Department is lying when it says it didn’t know until it was too late that Hillary Clinton was improperly using personal emails and a private server to conduct official business — because it never set up an agency email address for her in the first place, the department’s former top watchdog says.

“This was all planned in advance” to skirt rules governing federal records management, said Howard J. Krongard, who served as the agency’s inspector general from 2005 to 2008.

The Harvard-educated lawyer points out that, from Day One, Clinton was never assigned and never used a state.gov email address like previous secretaries.

“That’s a change in the standard. It tells me that this was premeditated. And this eliminates claims by the State Department that they were unaware of her private email server until later,” Krongard said in an exclusive interview. “How else was she supposed to do business without email?”

He also points to the unusual absence of a permanent inspector general during Clinton’s entire 2009-2013 term at the department. He said the 5½-year vacancy was unprecedented.

“This is a major gap. In fact, it’s without precedent,” he said. “It’s the longest period any department has gone without an IG.”

Inspectors general serve an essential and unique role in the federal government by independently investigating agency waste, fraud and abuse. Their oversight also covers violations of communications security procedures.

“It’s clear she did not want to be subject to internal investigations,” Krongard said. An email audit would have easily uncovered the secret information flowing from classified government networks to the private unprotected system she set up in her New York home.

He says “the key” to the FBI’s investigation of Emailgate is determining how highly sensitive state secrets in the classified network, known as SIPRNet, ended up in Clinton’s personal emails.

“The starting point of the investigation is the material going through SIPRNet. She couldn’t function without the information coming over SIPRNet,” Krongard said. “How did she get it on her home server? It can’t just jump from one system to the other. Someone had to move it, copy it. The question is who did that?”

As The Post first reported, the FBI is investigating whether Clinton’s deputies copied top-secret information from the department’s classified network to its unclassified network where it was sent to Hillary’s unsecured, unencrypted email account.

‘It tells me that this was premeditated. And this eliminates claims by the State Department that they were unaware of her private email server until later.’ - Howard J. Krongard on the State Department never giving Hillary an agency email address

FBI agents are focusing on three of Clinton’s top department aides. Most of the 1,340 Clinton emails deemed classified by intelligence agency reviewers were sent to her by her chief of staff, Cheryl Mills, or her deputy chiefs, Huma Abedin and Jake Sullivan, who now hold high positions in Clinton’s presidential campaign.

“They are facing significant scrutiny now,” Krongard said, and are under “enormous pressure to cooperate” with investigators.

He says staffers who had access to secret material more than likely summarized it for Clinton in the emails they sent to her; but he doesn’t rule out the use of thumb drives to transfer classified information from one system to the other, which would be a serious security breach. Some of the classified computers at Foggy Bottom have ports for memory sticks.

Either way, there would be an audit trail for investigators to follow. The SIPRNet system maintains the identity of all users and their log-on and log-off times, among other activities.

“This totally eliminates the false premise that she got nothing marked classified,” Krongard said. “She’s hiding behind this defense. But they [emails] had to be classified, because otherwise [the information in them] wouldn’t be on the SIPRNet.”

Added Krongard: “She’s trying to distance herself from the conversion from SIPRNet to [the nonsecure] NIPRNet and to her server, but she’s throwing her staffers under the bus.”

Still, “It will never get to an indictment,” Krongard said.

For one, he says, any criminal referral to the Justice Department from the FBI “will have to go through four loyal Democrat women” — Assistant Attorney General Leslie Caldwell, who heads the department’s criminal division; Deputy Attorney General Sally Yates; Attorney General Loretta Lynch; and top White House adviser Valerie Jarrett.

Even if they accept the referral, he says, the case quickly and quietly will be plea-bargained down to misdemeanors punishable by fines in a deal similar to the one Clinton’s lawyer, David Kendall, secured for Gen. David Petraeus. In other words, a big slap on the wrist.

“He knows the drill,” Krongard said of Kendall.

Paul Sperry, a visiting media fellow at the Hoover Institution, is author of “Infiltration.”