Ex-FBI Director James Comey was lectured by a Republican congressman on the insecurities of Gmail months before a government watchdog found he used a personal account on the free service to conduct FBI business.

The Justice Department inspector general found five instances of Comey using a Gmail account for unclassified bureau business, in a report released Thursday that found such behavior "inconsistent with" Justice Department policy.

[READ: DOJ inspector general's report on Hillary Clinton email investigation]

Comey's use of Gmail was documented to be between November 2016 and March 2017, and he defended those instances as being "incidental" and not involving classified or sensitive information.

Months earlier, one week after Comey recommended no criminal charges be brought against Hillary Clinton for her use of a private email server during a press conference on July 6, 2016, Comey was grilled during testimony about a comment he made bemoaning that Clinton's server lacked a "full-time security staff" like what could be found at commercial email services like Gmail.

"I'm not a lawyer, that's the good news. I'm a career businessman. I spent most of my career operating in the high- tech industry," said Rep. Rod Blum, R-Iowa, at a hearing on the Clinton emails investigation. "Today, I heard words such as common sense, reasonable person, carelessness, judgment, or lack thereof. I like these words. I understand these words. I think the average American does as well. I'd like to focus on that."

He said during Comey's press conference the week prior, the FBI director declared, "'None of these emails should have been on any kind of unclassified system, but their presence is especially concerning because all these e-mails were housed on unclassified personal servers not even supported by full- time security staff like those found at agencies of the United States government or even with a commercial e-mail service such as Gmail.'"

"Director Comey," he said, "my small Iowa business doesn't even use Gmail for our email because it's not secure enough. I know some security experts in the industry. I check with them. The going rate to hack into somebody's Gmail account, $129. For corporate emails, they can be hacked for $500 or less. If you want to hack into an IP address, it's around $100. I'm sure the FBI can probably do it cheaper. This is the going rate."

The congressman then asked: "Director Comey, are you implying in that statement that the private email servers of Secretary Clinton's were perhaps less secure than a Gmail account that is used for free by a billion people around this planet?"

In reply, Comey said he wasn't "looking to pick on Gmail," before going on to laud the tech company's efforts to maintain security.

"Their security is actually pretty good, the weakness is in the individual users," he testified. "But, yes, Gmail has full-time security staff and thinks about patching, and logging, and protecting their systems in a way that was not the case here."





Despite Comey's defense of Gmail's security features during the hearing, months later Comey claimed that he pressed upon subordinates that the use of Gmail was a bad thing.

The IG report notes that in October 2016, Comey said at an FBI conference in San Diego that FBI officials who use Gmail, or use a private server like Clinton did, would be in "huge trouble."

"I have gotten emails from some employees about this, who said, 'If I did what Hillary Clinton did I'd be in huge trouble,'" Comey said as he made made his case about there not being enough evidence to warrant prosecution against Clinton. "My response is you bet your ass you'd be in huge trouble."

He continued: "If you used a personal email, Gmail or if you [had] the capabilities to set up your own email domain, if you used an unclassified personal email system to do our business in the course of doing our business even though you were communicating with people with clearances and doing work you discussed classified matters in that, in those communications, TS/SCI, special access programs, you would be in huge trouble in the FBI."

"Of that I am highly confident," he added. "I'm also highly confident, in fact, certain you would not be criminally prosecuted for that conduct."

His struggles with technology are well documented. For instance, Comey revealed he was secretly on both Twitter and Instagram at a conference in March 2017, two months before he was fired in May by President Trump, which led to people tracking down what accounts he may have used.

That hunt ultimately led to the outing of a Twitter account he now openly uses as a private citizen to condemn Trump's treatment of the FBI.