Peter Strzok, the FBI agent who promised he’d make sure Donald Trump lost the election, was escorted out of the agency’s headquarters on Tuesday.

His lawyer, Aitan Goelman, confirmed a report that his client left the building with an escort during an internal review of his conduct, but said he was still employed by the FBI.

“Pete has steadfastly played by the rules and respected the process, and yet he continues to be the target of unfounded personal attacks, political games and inappropriate information leaks,” Goelman said in a statement.

“Despite being put through a highly questionable process, Pete has complied with every FBI procedure, including being escorted from the building as part of the ongoing internal proceedings.”

Strzok’ s behavior came up earlier Tuesday at a congressional hearing, where the inspector general of the Justice Department said the anti-Trump views expressed by him and gal pal Lisa Page, also an FBI employee, were “extremely serious [and] completely antithetical to the core values” of the agency and they wouldn’t have been allowed to work on his staff.

Testifying before the House Oversight and Judiciary Committees, IG Michael Horowitz said “it’s clear” the duo wanted to stop Trump from becoming president — but insisted that didn’t affect the outcomes of their investigation into Hillary Clinton’s private e-mail server.

However, Horowitz confirmed the biases of the two will be part of his investigation into how the Trump campaign became part of the investigation into Russian election meddling.

The most damning evidence Horowitz found in his investigation of Clinton’s e-mails was the now-infamous text exchange between Strzok and Page in 2016.

“[Trump’s] not ever going to become president, right? Right?!” Page texted Strzok.

“No. No he won’t. We’ll stop it,” Strzok responded.

The 500-page report Horowitz released last week found anti-Trump political bias at the FBI with Strzok, Page and three other unnamed FBI agents.

But Horowitz reported that did not sway the final outcome of the case, which ultimately did not lead to charges against Clinton.

Horowitz stood by his conclusion that the decision not to prosecute was based on the prosecutors’ assessment of the facts, the law and past practice.

But Republicans insisted the views of a few FBI agents rigged the outcome in favor of Clinton and demanded further investigation.

“The fact is, bias is all the way through this, and I’m sorry that you were not able to see that with what is very obvious from your evidence,” Rep. Louie Gohmert (R-Texas) said.