For more than three decades, CIA polygraphers collected what they hoped would be damning evidence that Michael Pillsbury should be barred from seeing government secrets.

As the dossier on him grew, the China expert nonetheless advised three Republican presidents, got countless security clearances, was a top defense official under President George W. Bush and did sensitive work for the CIA.

The extent of the allegations against him finally came spilling out two years ago, when Pillsbury discovered that he was accused of making multiple confessions during polygraph tests that he later said he’d never made. When he demanded to refute the accusations, CIA security officials politely demurred. Agency officials informed his attorneys that the constitutional right to due process didn’t apply to polygraph screening.

“Polygraphers have no accountability,” Pillsbury wrote this week in a letter to James Clapper, the director of national intelligence. “This is wrong and needs to be corrected.”

The tens of thousands of Americans who now undergo federal polygraph screening every year for jobs or security clearances face entrenched secrecy and daunting legal hurdles if they challenge their tests. Most federal employees are barred from suing in court, forced instead to seek recourse from the agencies that denied their jobs or security clearances in the first place.

As a result, critics say, polygraph abuses go unchecked. Allegations of anti-Semitism and discrimination against Muslims have percolated throughout the intelligence world over the years without ever being aired in court, because the government successfully argues that it would jeopardize national security if the cases proceed.

Congress, meanwhile, has relinquished oversight despite concerns about the scientific reliability of the tests. Before the Sept. 11, 2001, terrorist attacks, lawmakers held hearings to debate the wisdom of polygraph screening. Since then, Congress has dropped a reporting requirement for the Pentagon and required Customs and Border Protection to polygraph all law enforcement applicants.

Federal polygraph programs have flourished, targeting a growing number of private contractors with more intensely personal questions than ever before. More than 70,000 people are now screened yearly.

Yet thousands of people a year could be identified as lying in polygraph screenings when they’re not, according to statistical models by the National Academies, which advises the federal government on scientific matters. Under the current system, many of them would have no way to legally challenge polygraphers’ conclusions, especially in the intelligence world.

With the help of some of Washington’s top lawyers, Pillsbury realized he was a rare exception. Despite the CIA’s insistence he couldn’t appeal outside the agency, he discovered that as a government consultant he could turn to an obscure board of administrative judges. After an almost two-year dispute, backed by the law firm Williams & Connolly, he was able to rebut the statements attributed to him and a judge granted him the top-secret access he’d requested.

That board, the Defense Office of Hearings and Appeals, is mainly set up for contractors and consultants, but even people in those categories often discover they’re barred for other reasons.

Pillsbury, who was most recently a Mitt Romney adviser, declined to comment on the ruling, which hasn’t previously been revealed. A controversial foreign-policy hawk, his propensity for talking to the news media prompted a leak investigation in the late 1980s. His lawyers cited his fear of being wrongfully targeted again. The CIA accepted the board’s ruling but didn’t investigate the polygraphers.

The CIA said it couldn’t comment on any specific allegations because it was legally prohibited from speaking about individuals under privacy laws. The agency, however, defended its polygraphers as “highly trained” and “among the best in their profession.”

The 40-page ruling in Pillsbury’s 2010 appeal remains unpublished. In his letter to Clapper, obtained by McClatchy Newspapers, Pillsbury said his team of lawyers, which included former Air Force Secretary F. Whitten Peters, mounted an elaborate defense to demonstrate that polygraphers from several agencies had distorted his statements.

The CIA, however, refused to give Pillsbury’s lawyers tape recordings of his alleged admissions during six polygraph tests over his career. CIA security officials also declined to appear before the judges to detail the allegations that he’d leaked sensitive information. His lawyers called 14 witnesses to rebut the alleged admissions, including three senior CIA officials.

John Sullivan, a retired longtime CIA polygrapher who testified on Pillsbury’s behalf, said he’d often discovered that people had exaggerated or lied about mistreatment when he reviewed tapes of their sessions. But in the 1980s, the agency discovered that seven polygraphers had rigged the tests so that applicants and employees would pass, and it fired them. Another polygrapher falsely claimed that two people had failed. While she also was fired, she did not lose her security clearance.

Sullivan said the problem was that the polygraph division was left to police itself.

“That is similar to asking the fox to guard the chicken coop,” he said, adding that one top agency official told polygraphers, “If you aren’t getting complaints, you are not doing your job.”

All polygraphers are trained at the same federal academy and are warned against engaging in unethical and discriminatory behavior. The academy also routinely inspects polygraph programs to ensure they are in line with federal standards.

But critics say the inspections are cursory and often miss major problems. The academy inspected the National Reconnaissance Office, yet it didn’t appear to pick up on a major internal controversy. McClatchy earlier this year detailed allegations by current and former polygraphers that they were pushed to collect intensely personal information in violation of Pentagon rules and were rewarded with bonuses for doing so. In a recent letter to Clapper, Rep. Rush Holt, a New Jersey Democrat, urged the director to “move us beyond the use of such an unreliable instrument as the polygraph,” citing the alleged abuses at the National Reconnaissance Office as reason for alarm.

“Such voyeuristic interrogation” brings to mind “tactics employed by our former Soviet enemies,” the retired Princeton University physicist wrote.