A former FBI official says former FBI Director James Comey's team may have run afoul of "strict guidelines" in its counterintelligence investigation of the Trump campaign during the 2016 election.

Kevin Brock, former assistant director of intelligence at the FBI, wrote an op-ed for The Hill in which he said Comey is "in trouble and he knows it."

Although Comey asserts he did nothing wrong, Brock says the incoming reports from U.S. Attorney John Huber and Justice Department Inspector General Michael Horowitz, as well as an assessment by Attorney General William Barr, may say different.

He focused part of the piece on the bureau's use of confidential human sources to make contact with members of President Trump's campaign who had suspicious ties to Russia.

"Without diving into the weeds, it’s important to understand that FBI counterintelligence investigations generally proceed sequentially from what is called a 'preliminary investigation or inquiry' (PI) to a 'full investigation' (FI). To move from a PI to an FI requires substantial information — predication — indicating investigative targets acted as agents of a foreign power," Brock wrote.

"This is problematic for Comey in light of Mueller’s findings," Brock said, referring to the recently completed investigation conducted by special counsel Robert Mueller.

"There are strict guidelines governing when the FBI can task a confidential source or a government undercover operative to collect against a U.S. citizen. Normally this is restricted to an FI, and normally restricted to the United States, not overseas," he said. "There is a sense that Comey’s team was not checking the boxes, did not have adequate predication, and may have tasked sources before an investigation was even officially opened. Barr should pull case files and dig in on this."

The FBI launched its original counterintelligence investigation, called Crossfire Hurricane, in July 2016. It was prompted by Australian diplomat Alexander Downer informing the U.S. government that Trump campaign adviser George Papadopoulos told him Russia had "dirt" on Hillary Clinton, Trump's Democratic rival in the 2016 election.

The FBI had multiple confidential sources make contact with members of Trump's team, including Cambridge professor Stefan Halper and a woman posing as his assistant, Azra Turk, who met with Papadopoulos and asked him about the Russians. Horowitz is looking into whether Halper, who also met with other Trump campaign officials, exceeded his mandate.

Furthermore, text messages from former FBI agent Peter Strzok, referred to the intelligence community inspector general this week by two GOP senators, indicate that he believed the CIA was leaking to the media about the Trump campaign and suspicious ties to the Russians and was involved in the investigation far earlier than previously known.

In recent weeks, Comey has spoken out, denying Barr's assertion that "spying did occur" on the Trump campaign. He wrote in a New York Times op-ed that Trump's "amoral" leadership has corrupted Barr and Deputy Attorney General Rod Rosenstein. He is also set to appear in a CNN town hall on Thursday, exactly two years after Trump fired him as FBI director.

Trump said in a recent Fox News interview that Comey "probably was one of the people leading the effort on spying" on his 2016 campaign.

[Read more: James Comey defends FBI use of 'limited tools' in Trump-Russia investigation]