Jimmy Ray Bromgard, 33, immediately turned and hugged family members in the courtroom.
"I never did think he did it in the first place," said Bromgard's mother, Dianna Merrill.
District Judge G. Todd Baugh approved the request by the Yellowstone County attorney and Montana Attorney General Mike McGrath, who had asked the judge to vacate Bromgard's convictions based on the results of DNA testing that wasn't widely used at the time of Bromgard's trial.
"Clearly from the DNA analysis, Mr. Bromgard was wrongly and in error convicted," the judge said.
Baugh apologized to Bromgard and his family and ordered him to be freed immediately.
"I didn't think I was ever going to get out," Bromgard said after leaving the courtroom.
Bromgard had been serving a 40-year sentence for allegedly sexually assaulting an 8-year-old girl in her bedroom in Billings. A jury found him guilty on three counts of rape following a 1987 trial.
The conviction was based largely on the testimony of the young victim and on testimony from a state crime lab expert. The expert testified that a pubic hair found in the girl's bedding was indistinguishable from samples taken from Bromgard.
However, Bromgard and attorneys from the Innocence Project, a group that seeks to free inmates through new tests, requested DNA tests. One, performed by an independent lab in California, showed the samples did not match Bromgard's DNA. Another by the Montana Crime Lab, confirmed the findings, officials said.
Separately, Peter Neufeld, an attorney for Bromgard and co-founder of the Innocence Project, called on McGrath to review other cases in which the same state crime lab expert testified on hair evidence.
McGrath said Tuesday that his office was reviewing Neufeld's request, adding, "I think it is something that we would want to look at on a case-by-case basis."
Branded a child molester in prison, Bromgard said he suffered repeated assaults and had his jaw broken. He learned to fight back, earned his high school equivalency diploma and said he let go of his anger.
Still, he said, "I don't ever think I'll have faith in the system again."
The Innocence Project says that Bromgard is the 111th inmate to have been freed in the United States through new DNA evidence.
By Becky Bohrer