Former FBI agent Peter Strzok alleges in a new book that investigators came to believe it was “conceivable, if unlikely” that Russia was secretly controlling President Trump after he took office — a full-fledged “Manchurian candidate” installed as America’s commander in chief.

In the book, “Compromised,” Strzok describes how the FBI had to consider “whether the man about to be inaugurated was willing to place his or Russia’s interests above those of American citizens,” and if and how agents could investigate that. Strzok opened the FBI’s 2016 investigation into whether Trump’s campaign had coordinated with the Kremlin to help his election and later was involved in investigating Trump personally. He was ultimately removed from the case over private text messages disparaging of the president.

“We certainly had evidence that this was the case: that Trump, while gleefully wreaking havoc on America’s political institutions and norms, was pulling his punches when it came to our historic adversary, Russia,” Strzok writes. “Given what we knew or had cause to suspect about Trump’s compromising behavior in the weeks, months, and years leading up to the election, moreover, it also seemed conceivable, if unlikely, that Moscow had indeed pulled off the most stunning intelligence achievement in human history: secretly controlling the president of the United States — a Manchurian candidate elected.”

Strzok seems to believe now that is not the case — though he told the Atlantic that Trump’s conduct is deeply problematic.

“I don’t think that Trump, when he meets with Putin, receives a task list for the next quarter,” Strzok said, referencing the Russian president, Vladimir Putin. “But I do think the president is compromised, that he is unable to put the interests of our nation first, that he acts from hidden motives, because there is leverage over him, held specifically by the Russians but potentially others as well.”

Strzok’s book is the latest by former FBI officials — including former director James B. Comey and former deputy director Andrew McCabe — to disclose new insights into the bureau’s investigation of Trump, while lambasting the president for his conduct.

The FBI’s investigation was taken over by special counsel Robert S. Mueller III, who could not substantiate a criminal conspiracy with Russia. Mueller did, however, conclude that the Trump campaign was willing to accept Russian assistance to help win the election, and that Russia was willing to give it; his report outlined ways Trump might have obstructed the special counsel’s inquiry.

Mueller’s final report, released last year, reached no determination on whether that conduct was criminal, and Attorney General William P. Barr reviewed the matter and determined it was not.

Strzok, a veteran counterintelligence investigator, tries to bring his experience in that area to the discussion of Trump, alleging repeatedly that the president seemed to be compromising himself as he lied publicly about his business dealings in Russia, or his interactions with that country’s officials. That, Strzok writes, essentially gave Russia leverage over the president.

“Trump’s apparent lies — public, sustained, refutable, and damaging if exposed — are an intelligence officer’s dream,” Strzok writes. “For that very reason, they are also a counterintelligence officer’s nightmare.”

Strzok was also a key figure in the investigation into whether Hillary Clinton had mishandled classified information by using a private email server while she was secretary of state during the Obama administration. His book seeks to pull back the curtain on that case as well, contrasting it with the investigation into Trump.

Strzok writes that he now believes it was the wrong decision for Comey to announce publicly in July 2016, just months ahead of the election, that he was recommending Clinton not be charged while criticizing her conduct. He talks, too, of institutional bias against the former Democratic presidential candidate, claiming a retired executive — whom he did not name in the book — said at lunch one day, “Pete, you’ve got to get that b----.”

Strzok’s view, though, is that the investigation into Clinton was a far less serious matter than the inquiry into Trump.

Even as he says Clinton’s use of a private server is what fueled investigators’ interest, Strzok allows that had her email been housed on the State Department system, “it would have been less secure and probably much more vulnerable to hacking.” He also concedes that Comey’s decision in October 2016 to reveal to Congress that the investigation had resumed ­— less than two weeks before voters were to go to the polls — probably altered the results of the election in Trump’s favor.

“Reflecting back on 2016 reveals another hard truth: small margins matter in an election in which the total number of Pennsylvania, Wisconsin and Michigan voters needed to swing the Electoral College would fit in one football stadium,” Strzok writes. “Pundits who argue that it’s hard to substantively change public opinion miss the point: when you’re dealing with razor-thin margins, it doesn’t take much to move the needle. And as much as it pains me to admit it, the Russians weren’t the only ones who pushed the needle toward Trump. The Bureau did too.”

But Strzok also jabs at Clinton advisers for, at times, not being fully cooperative, and says some of Clinton’s answers in her interview with the FBI were “aggravating” for how carefully she chose her words. He cryptically hints that Russians did not release more material they had procured about her, possibly saving it for if she had been elected.

“We also knew through classified channels that the Russians had material with the potential to be greatly disruptive, yet they had chosen not to release it,” Strzok writes. “Were they waiting for Election Day? Were they holding it in reserve to discredit Clinton?” He writes that the substance of the material is still classified.

As McCabe and Comey did, Strzok discusses at some length the behind-the-scenes talks about investigating Trump, including in the early days of Mueller’s investigation. Strzok, who was briefly the lead FBI agent on Mueller’s team, writes that he and Mueller composed a team “representing a cross-section of criminal and counterintelligence expertise,” because he was concerned with some of the noncriminal aspects of Trump’s behavior.

“The broader counterintelligence concerns about the president — which included the ways in which his suspected obstruction of the Russia probe might have been coerced by or intended to aid Russia — were investigated by multiple teams,” Strzok writes.

Strzok was removed from the Mueller team in August 2017, after the Justice Department inspector general found he had exchanged anti-Trump texts with FBI lawyer Lisa Page. He was ultimately fired from the bureau over the missives. In his book, Strzok defends the messages as private expressions of his political views, and writes that he vehemently disputes the inspector general’s insinuation in a report that they indicated a willingness to use his position to hurt Trump.

Strzok rebukes current FBI and Justice Department leaders for succumbing to Trump’s repeated attacks on law enforcement. He alleges that they helped foster a culture where those involved in the Clinton and Trump investigations were “shunned and disavowed,” and that Trump had effectively turned the investigation of his own conduct into a “third rail.”

FBI Deputy Director David Bowdich ordered Strzok’s firing, overriding the decision of a lower level official who proposed lesser discipline. Strzok is also critical of FBI Director Christopher A. Wray, in particular, for his concession at a congressional hearing that he had not read all of Mueller’s report.

“However indefensible, the short-term message was clear: DOJ and the FBI’s new leaders were disclaiming responsibility for any investigation relating to Midyear or Crossfire,” Strzok writes, using the code names for the Clinton and Trump investigations. “The long-term message was far worse: it was just too perilous to investigate matters relating to Trump.”