The Supreme Court ruled yesterday that state and federal governments may ban the use of polygraph evidence in court, declaring that doubts and uncertainties remain about the accuracy of the so-called lie-detector tests.

Close to 30 states, including Maryland and Virginia, ban polygraph evidence, and some legal experts said yesterday's 8 to 1 decision may prompt the states that do not have outright prohibitions on polygraphs to consider imposing them.

The ruling marks the first time the high court has taken up the issue of polygraph testing, and it comes at a time when the machines are increasingly being used outside the courtroom. Prosecutors use them to extract confessions from suspects and defense lawyers use them for leverage in plea bargains. The military uses them to safeguard national security and prevent espionage, and companies often rely on them to uncover employee wrongdoing or to monitor workers in sensitive jobs.

Although the test results can still be used for these purposes, the Supreme Court yesterday said they can be banned from courtrooms, and sent a signal that their accuracy is in doubt.

Advocates of polygraphs say the instruments have grown increasingly sophisticated in recent years in their ability to determine whether a person is lying by recording their breathing, blood pressure and skin conditions.

But several justices expressed skepticism about the science and the ability of any examiner using the polygraph device to accurately gauge whether someone is telling the truth.

"There is simply no consensus that polygraph evidence is reliable," Justice Clarence Thomas wrote for the court.

Because "uncertainties plague even the best polygraph exams," the court found that prohibiting a defendant from introducing the results of a polygraph test, to show he is telling the truth, does not violate his right to fully defend himself.

Yesterday's case involved Edward G. Scheffer, a former U.S. airman who was court-martialed for using methamphetamines, passing bad checks and going AWOL. Yet he had passed a polygraph test asking whether he had used illegal drugs. The U.S. Court of Appeals for the Armed Forces said the military's automatic ban on polygraphs was unconstitutional and that Scheffer had a right to at least try to lay a foundation for the reliability of the polygraph result, as he would other evidence.

But the Supreme Court reversed that decision, ruling that Scheffer was not "significantly impaired" by exclusion of the polygraph evidence.

Although only one justice dissented, the majority spoke with no definitiveness.

Thomas and three other justices sought not only to uphold bans on polygraph evidence, but to discourage states from ever allowing their use in court. "By its very nature, polygraph evidence may diminish the jury's role in making credibility determinations," Thomas said, joined by Chief Justice William H. Rehnquist and Justices Antonin Scalia and David H. Souter.

But the other justices in the majority broke ranks, saying that perhaps in the future another dispute might offer a more compelling case for the introduction of polygraph testimony.

Justice Anthony M. Kennedy wrote in a concurring statement that he agreed with the majority that a defendant does not have a constitutional right to use polygraph evidence, but he doubted that an automatic exclusion of the evidence was "wise." Joined by Justices Sandra Day O'Connor, Ruth Bader Ginsburg and Stephen G. Breyer, Kennedy said some later case may be more compelling to say that defendants have a right to introduce polygraphs.

Justice John Paul Stevens, who was the lone dissenter, emphasized the value of the tests to a defendant and noted that the military gives "hundreds of thousands of such tests and routinely uses their results for a wide variety of official decisions."

Stevens called the government's position inconsistent. While it routinely uses the test and says it is an "effective investigatory tool," the Justice Department said it was not reliable enough to be used in court and, unlike other scientific evidence, could mislead a jury by purporting to show the "truth."

"There will always be critics of the polygraph," said Gordon L. Vaughan, counsel for the American Polygraph Association. "But I think the opinions suggest that there is an ongoing debate about the reliability of the polygraph." Thomas wrote that most states ban polygraph evidence, and Vaughan said that breaks down into 29 states with outright bans, 16 states that allow some test results if both the prosecution and defense agree to it. One state, New Mexico, makes them generally admissible.

Federal courts are split on whether polygraph results may be introduced. "This ruling could have some tendency to discourage the admission of polygraphs," said Charles W. Daniels of the National Association of Criminal Defense Lawyers.

Charles L. Hobson, of the Criminal Justice Legal Foundation, which sided with the government, said the ruling in United States v. Scheffer properly gives state and federal governments the ability to limit questionable evidence.