A 69-year-old former Oklahoma police officer has pleaded guilty to five obstruction of justice and mail fraud charges in connection to an indictment accusing him of teaching people to successfully cheat on lie detector tests.

According to last year's indictment (PDF), Douglas Williams charged customers for instruction on how to beat lie detector tests given during national security, federal, state, and local employment suitability assessments and for internal federal investigations.

"Lying, deception and fraud cannot be allowed to influence the hiring of national security and law enforcement officials, particularly when it might affect the security of our borders," Assistant Attorney General Leslie Caldwell said. "Today’s conviction sends a message that we pursue those who attempt to corrupt law enforcement wherever and however they may try to do so."

On a YouTube video, Williams tells potential customers that "I can teach you how to pass, nervous or not, no matter what." He also said, "Remember, failing to prepare is simply preparing to fail."

According to court documents (PDF), Williams conceded Wednesday that he "committed the acts" alleged in the indictment.

The indictment says Williams told an undercover agent that "I haven't lived this long and fucked the government this long, and done such a controversial thing that I do for this long, and got away with it without any trouble whatsoever, by being a dumb ass." The authorities said he told another undercover agent that "I've taught a lot of those guys. In fact, there's a lot of government agents—FBI, Secret Service, NSA, all of those alphabet agencies—that have already retired, that I taught, years ago. And I know what I'm doing, and you will pass with no problem."

Polygraph machines were invented in 1921 and their results are usually not admissible as evidence in court. Discussions about how to beat them are easily found online, including on Ars forums.

Williams isn't the first person prosecuted for these type of allegations. An Indiana man was accused of offering similar services and was sentenced in 2013 to eight months in prison. The judge presiding over the case said the case blended a "gray area" of First Amendment speech and the unlawful act of instructing people to lie on polygraph tests issued by the federal government.

Williams' site, Polygraph.com, is now defunct. Williams' attorneys did not immediately respond to a request for comment.

Williams faces up to 20 years in prison (PDF) and a $250,000 fine. No sentencing date has been set.