Gary Smith says he didn’t kill his roommate. Montgomery County prosecutors say otherwise.

Can brain scans show whether he’s lying?

Smith is about to go on trial in the 2006 shooting death of fellow Army Ranger Michael McQueen. He has long said that McQueen committed suicide, but now he says he has cutting-edge science to back that up.

While technicians watched his brain during an MRI, Smith answered a series of questions, including: “Did you kill Michael McQueen?”

It may sound like science fiction. But some of the nation’s leading neuroscientists, who are using the same technology to study Alzheimer’s disease and memory, say it also can show — at least in the low-stakes environment of a laboratory — when someone is being deceptive.

Many experts doubt whether the technology is ready for the real world, and judges have kept it out of the courtroom.

Over three days, Montgomery County Circuit Court Judge Eric M. Johnson allowed pretrial testimony about what he called the “absolutely fascinating” issues involved, from the minutiae of brain analysis to the nature of truth and lies. But he decided jurors can’t see Smith’s MRI testing.

“There have been some discoveries that deception may be able to be detected,” Johnson said, but he added that there’s no consensus that the results can be trusted. “These are brilliant people, and they don’t agree.”

Still, researchers and legal experts say they can envision a time when such brain scans are used as lie detectors. Standard polygraphs are generally not admitted in trials because some consider them deeply flawed. During his police interrogation, Smith said he would submit himself to a polygraph, but Johnson said such results would not be allowed as evidence.

Smith’s attorney, Andrew V. Jezic, argued in court that the MRI test should be allowed, and neuroscientists sparred over the credibility and usefulness in a jury trial.

Prosecutors hate the idea, saying that replacing living, breathing suspects with a stack of colorful brain images would upend the legal system. “The jury’s the decider of credibility,” said John Maloney, Montgomery deputy state’s attorney, who argued that Smith’s brain scans are worthless.

But Smith, who is facing his second murder trial in the case after an appeals court threw out an earlier conviction, says it’s an important tool to back up his account. “After fighting for everybody else’s freedom . . . to be put in prison for a crime I did not commit was extremely frustrating,” Smith said. “It may not be perfect, but it’s definitely something reliable and should be considered.”

Smith and McQueen, who had served together in Afghanistan and shared a Gaithersburg apartment, hung out the night of Sept. 25, 2006, drinking beer and smoking marijuana, court papers say. They went to a VFW and played pool. Just before 1 a.m., Smith called 911. “Oh my God, help me,” he sobbed, telling the dispatcher that he had found McQueen dead. “I dropped him off at the house, and I came back, and he had a big hole in his head.”

When officers arrived, they found Smith, with blood on his hand, face and clothes, vomiting outside the apartment, court papers say. McQueen’s body was in a metal chair in front of a flickering television. They didn’t find a gun.

In evidence that is key to the prosecution’s case, Smith would later give detectives three accounts of what happened, court papers say.

The first time, Smith said he’d been out and returned to find McQueen dead with no gun in the house. Pointing to possible suspects, he said McQueen had argued with some Hispanic men in the past. In version two, Smith returned to find McQueen dead with a gun in his hand. In version three, Smith was in the apartment and McQueen shot himself.

Smith said McQueen used Smith’s gun, and he panicked. He removed the bullets and tossed them and the gun in a nearby lake.

Outside of crimes caught on video or solved with DNA, few pieces of evidence offer clear proof of guilt. Eyewitnesses can make mistakes, and problems have been found in hair and fiber analysis and arson investigations. Maryland judges tell jurors to use their common sense and life experiences to decide whether witnesses are being truthful.

Frank Haist, assistant professor of psychiatry at the University of California at San Diego, analyzed Smith’s brain scans. He was hired as a consultant in Smith’s case for No Lie MRI, a firm commercializing the technology. In his own research, Haist has used brain MRIs to study how people of different ages and races and those with autism process faces.

If Smith chooses to testify at trial, Haist said, “he would be asked and the jury would like to know: ‘Did he shoot Michael McQueen?’ Obviously, his answer would be no.” Jurors would see whether Smith was sweating or not, Haist said. They would see whether he appeared nervous. And they would make judgments.

The scans, he said, would give them one more factor to consider.

“You’re making a decision based on the way he looks, the way he acts. This is just another way he acts. It’s just looking at the way his brain is acting,” Haist said.

Here’s how it works: Scientists use a machine called a functional MRI, which is similar to traditional magnetic resonance imaging but focuses on brain activity, not just structure.

Over more than a decade, researchers have devised a series of experiments using those scans to see what lying looks like inside the brain. A University of Pennsylvania study asked subjects to lie about holding a five of clubs. In another study, men in Hong Kong were shown images and asked to lie about their feelings about them. Accuracy rates for picking out the deceptions topped 90 percent in some cases.

Harvard Medical School assistant professor Giorgio Ganis hit 100 percent in a study that asked students to lie when they saw their birth date. “We probably got a little bit lucky,” Ganis said.

In Smith’s case, technicians instructed him to lie as he answered several questions about his military service, including: “Were you ever deployed in Iraq?” He was but said he wasn’t.

They also asked him “target questions” about his roommate’s death. Among them: “Did you shoot Mike McQueen?”

The scientists then compared the images of his brain activity: those taken when they knew he was lying with others captured as he responded about McQueen’s death.

“We know what Gary’s brain looks like when he’s trying to lie,” Haist said. And when he was answering questions about whether he killed McQueen, “it doesn’t appear the same as when he’s lying.”

But Haist said the tests can’t conclusively determine when someone is being honest.

“The MRI is not a truth machine,” he said. “I can’t say with certainty that he is telling the truth.”

Other experts said the scans don’t prove whether Smith is being either deceptive or truthful.

New York University neuroscientist Liz Phelps told the court that there is “no evidence” that the scans are useful in revealing a “real-world, self-serving lie.”

Stanford neuroscience professor Anthony D. Wagner, called by prosecutors, said that “it’s premature” to use the tests in court. “I, personally, don’t know how the literature is going to play out in the long run. . . . I’m not concluding that it can never be shown,” he said.

Smith first went to trial in 2008, and he was convicted of a form of second-degree murder known as “depraved heart murder,” which does not require that the state prove intent in the killing but rather “an extreme disregard for human life.” After the verdict, jurors told The Washington Post that they didn’t linger on the question of motive, instead focusing more on Smith’s behavior after the shooting. The jury keyed on Smith’s dumping of the gun and bullets. “That was one of the defining moments of finding his guilt,” one juror said.

Smith spent nearly four years behind bars before Maryland’s highest court threw out the conviction and sent the case back for a new trial, finding that the judge unfairly blocked testimony on McQueen’s state of mind.

McQueen had been arrested in Atlanta on a DUI charge, and Smith’s defense attorney wanted jurors to hear from an officer who said McQueen “appeared depressed . . . and said ‘this is the last thing I need in my life right now,’ ” according to court papers.

After McQueen’s death, his family rejected the idea that he was depressed or suicidal. McQueen’s father, who has since died, asked the judge to hold Smith accountable “for not the death — but the murder” of his son.

“I expected to live my whole life with my brother,” Otto McQueen told the judge. “I didn’t get that. None of our family got that.”

Beginning this week, a new jury will be seated to hear Smith’s case. It won’t hear about Smith’s MRI results because Johnson ruled that they were inadmissible even though he was captivated by the debate.

The Harvard birth-date experiment was cited by both sides as an example of the power the MRI might wield and its potential shortcomings.

Researchers put undergraduates in a functional MRI and showed them a series of irrelevant dates. The students were asked to press a “no” button if the date didn’t mean anything to them. Ganis also threw the subjects’ birthdays into the mix, telling them to lie and press “no” when that date displayed. Using a computer trained to recognize brain patterns, the researchers could accurately detect when the students were being deceptive.

But the students also were taught how to outwit the machine by “imperceptibly” moving a finger or a toe — basically to imagine moving them — when irrelevant dates appeared. That itself made the dates relevant, Ganis said, and the accuracy rate plummeted to 33 percent. “You are recalling something meaningful when you see the meaningless dates,” Ganis said. “The MRI can’t tell what’s going on.”

Ganis said that he has nothing against using MRIs for lie detection in the future but that more needs to be learned first about how the guilty could use similar tactics to trick the machine.