Bartow, Florida (CNN) -- After more than three decades in prison, a Florida man was set free Thursday after a DNA test showed he did not kidnap and rape a 9-year-old boy in 1974.
"I'm not angry," James Bain, 54, told reporters after a brief hearing in Bartow, Florida.
"I got God in my head," said Bain, surrounded by supporters and wearing a T-shirt with "Not Guilty" across the front. "I knew one day he will reveal me."
Of the 245 people in the United States whom DNA testing has exonerated, none has spent more time behind bars than Bain, according to the Innocence Project, a national organization dedicated to exonerating wrongfully convicted people through such testing.
In 2001, Florida passed a statute allowing cases to be reopened for DNA testing. Bain submitted handwritten motions four times seeking such testing but was denied each time. His fifth attempt was successful after an appeals court ruled he was entitled to a hearing.
Bain initially was expected to be freed with some conditions as the state wanted a further review of DNA test results. But the review was completed ahead of Thursday's hearing.
Polk County State Attorney Jerry Hill told the judge that DNA testing had excluded Bain from the crime.
"He's just not connected with this particular incident," Hill said.
"Mr. Bain, I'm now signing the order, sir," the judge said, referring to an order vacating the judgment and sentence.
"You are a free man. Congratulations," he said, and the courtroom erupted into applause.
In 1974, the 9-year-old Lake Wales, Florida, victim had told police that his attacker had bushy sideburns and a mustache. After being shown five photos of potential suspects, the victim picked out one of Bain, the police report said.
The victim, now 44, lives in Florida and was made aware of Bain's situation, according to multiple sources.
Speaking to reporters Thursday, Bain said he was going home with family. "I'm going to see my mom," he said.
His mother, Sarah Reed, has been in and out of hospitals in recent years. She said she is putting her house and her car in her son's name. "I want him to have something by himself. He's suffered enough," she said.
Asked about prison, Bain said, "So many things can happen to you at any time." But now, "I guess I kind of feel like when they first landed on the moon. We have touchdown," he said, laughing.
CNN's Rich Phillips contributed to this report.