In August 1997, I first went to the East Texas town of Carthage to find out more about Bernie Tiede, the then 39-year-old former assistant director of a local funeral home who had been arrested for murdering 81-year-old Mrs. Marjorie Nugent, one of the small town’s wealthiest widows. Bernie had confessed to police that in November 1996, he had shot Mrs. Nugent four times in the back then buried her in her own deep freeze, where she remained until sheriff’s deputies found her nearly nine months later.

Those facts alone made the story interesting enough. But I knew this was going to be unlike any story I had ever covered when I watched a group of townspeople surround District Attorney Danny Buck Davidson at the local barbeque joint, Daddy Sam’s—(the marquee out front read, “You Kill it, I’ll Cook It”)—to ask him to drop the charges against Bernie, or at the least agree to give Bernie a light probated sentence. They told Danny Buck that it was the right thing to do because Bernie was the nicest man in town and Mrs. Nugent was the meanest.

Danny Buck looked like he was going to explode. “But he confessed,” he bellowed at his constituents. “He confessed to being a back shooter!’

“Now Danny Buck, you just need to learn to forgive a man for making one mistake,” one of the townspeople quietly replied. “I’m going to tell you this right now, if I’m on that jury, I’m going to vote to acquit.”

I remember just shaking my head and thinking, “No one is going to believe any of this story is true.”

But it was, and I wrote about it for Texas Monthly in January 1998.

I shook my head again when in 2011, more than a decade after Bernie had been convicted of murder and sentenced to life in prison, Austin film director Richard Linklater somehow turned the whole macabre tale into a brilliant black comedy, Bernie, starring Jack Black, Shirley MacLaine and Matthew McConaughey. To my amazement, the independently produced film—it cost an estimated $6 million to make—became a hit of sorts, especially in Texas. One woman, a Dallas dentist’s wife, told me she had seen the movie “at least ten times.” (Full disclosure: I co-wrote the screenplay.)

Now, of course, I’m shaking my head again. Visiting Judge Diane DeVasto has just released the 55-year-old Bernie from prison on $10,000 personal recognizance bond. At a hearing Tuesday, she agreed with a motion filed by Bernie’s attorney Jodi Cole which claimed that if the jurors in the original trial had heard testimony about Bernie being sexually abused by a relative during his teenage years, they most likely would have given him a lesser sentence than life. What was perhaps most incredible was that Danny Buck, a long-time, hard-nosed prosecutor, told the judge that if he had known about the evidence of Bernie’s childhood abuse, he would only have prosecuted him for second degree murder, which has a maximum sentence of twenty years. Considering that Bernie has already served seventeen years, Danny Buck said he would be willing for Bernie to be released on time served.

The state’s court of criminal appeals now must decide whether Bernie should be re-tried with a new jury hearing evidence about the abuse he endured—a decision that might not take place for several months. But until that decision is made, Bernie can go free. DeVasto did say that along with his personal recognizance bond he must maintain employment, submit to and pay for random drug testing, live in a designated residence, not possess a firearm, not have contact with the victim’s family, and not have “voluntary contact” with the media.

Cole replied that Bernie would abide by all the rules. She added that he would move to Austin, work for her, and get counseling. And as for that designated residence? Richard Linklater, wearing a gray suit and a tie, took the witness stand, and dropped a bombshell. He said that he would let Bernie live in his garage apartment.

Bernie Tiede was about to walk out of prison and move in with one of the most celebrated film directors in America.

At the hearing, the 53-year-old Linklater, who earlier this year received an Oscar nomination for best adapted screenplay for Before Midnight and who is likely to get a best director nomination next year for his upcoming movie Boyhood, said he had been very impressed with Bernie during their meetings in prison. He noted that Bernie was often called the “model inmate” and that other prisoners looked up to him. He insisted that he was “very serious” about his desire to supervise Bernie as he adjusted to life in Austin, which is not exactly the spitting image of small-town Carthage. (In the movie Bernie, one Carthage man refers to state capital as “the People’s Republic of Austin with a bunch of hairy-legged women and liberal fruitcakes.”)

“Are you really sure you want to do this?” Linklater was asked by Danny Buck during the hearing.

“Yeah, absolutely,” said Linklater.

“No firearms and stuff like that?”

“No,” said Linklater, who is not exactly a member of the National Rifle Association.

Danny Buck seemed satisfied, and a few minutes later, DeVasto wished Bernie luck and ended the hearing.

Bernie, wearing an orange prison jumpsuit, wept into a handkerchief.

The announcement of Bernie’s release has hardly been met with universal approval. Comments on blogs and newspaper websites have been scornful. “This is absolutely unreal,” one man wrote to the paper in Longview, which is just up the road from Carthage. “We are going to have every murderer in the United States yelling they I was abused when I was a kid so they can take a walk as well!” And a spokesman for the Nugent family did issue a statement to the Texas Tribune claiming that the family firmly believed Bernie should continue to serve a life sentence.

But most people are, like me, simply amazed that Bernie is free. Just a few minutes ago, a reporter for the Los Angeles Times called me. “I don’t even know where to start,” he said. “Who’s ever heard of such a thing happening—all because of a movie?”

In fact, as I’ve written before, the whole movement to get Bernie released originated back in 2011, when Linklater made an appearance at a Texas Monthly sponsored screening of Bernie at the Violet Crown in Austin. Cole, a criminal defense attorney, walked up, introduced herself, and said that she wanted to get involved in Bernie’s appeal. She told him that it seemed unfair that Bernie had received a life sentence for committing such an impulsive, irrational act that didn’t jibe with his sweet personality. Maybe, she added, she could find some evidence that would result in a new trial for Bernie—or, at the least, a shorter sentence.

Linklater provided her with a trial transcript, and then he and Jack Black (who played Bernie in the movie) gave her some money to start looking into the possibility of an appeal. As part of her research, Cole read an inventory of what had been taken from Bernie’s home after his arrest. Included were four books on surviving childhood abuse. Cole asked Bernie about the books, and he eventually told her he had been severely sexually abused by an uncle for six years, between the ages of twelve to eighteen—a secret Bernie had told very few people, including his original lawyer, legendary East Texas attorney Scrappy Holmes who represented him at trial.

Cole then arranged for Bernie to be interviewed by Dr. Richard Pesikoff, a professor of psychiatry at the Baylor College of Medicine and one of the country’s most highly respected experts in forensic psychiatry. In a five-page report that he wrote this past December for Cole, Pesikoff said Bernie went into detail about the sexual abuse he endured from his uncle “on a regular basis,” leading to what Pesikoff described as “extremely painful and significant experiences.”

Cole’s argument to the judge was that if Holmes, Bernie’s original attorney, had known about Bernie’s childhood abuse, then he would have been better able to argue at trial that Bernie had long ago disconnected from his emotions and had experienced a “dissociative episode” on the day he shot Mrs. Nugent and buried her in the deep freeze under some chicken pot pies and a frozen turkey. In essence, Holmes would have been able to more persuasively explain to the jury why Bernie had “snapped” due to the verbal abuse he had endured from Mrs. Nugent.

But perhaps the most convincing testimony in today’s hearing came from the district attorney’s own psychiatrist, Dr. Edward Gripon, who had interviewed Bernie soon after his arrest and had concluded that Bernie had committed pre-meditated murder. Gripon said today that he had changed his opinion after hearing about Bernie’s childhood abuse and after having re-interviewed Bernie. He said he too believed Bernie had experienced a “dissociative” episode. “In my opinion he reacted on an impulse,” Gripon said about the murder. “He and Mrs. Nugent had an unusual and rather toxic relationship. For all the good there was with it, there was a certain amount of abuse and control and possessiveness.”

Gripon also testified that he does not believe Tiede is a danger to society because he had no history of violence prior to the 1996 murder and also because he has not had a “problematic” prison record. “It was a unique and usual event that occurred,” Gripon said. “It is not likely to recreate itself.”

Late this afternoon, a group of Carthage residents—all Bernie fans—were standing outside a courthouse, hoping to get a chance to talk to Bernie and wish him good luck. Around 5:20, Bernie and Linklater came out of the sheriff’s department—Bernie was wearing street clothes for the first time since August 1997—jumped into a white SUV, and raced out of Carthage, headed to the People’s Republic of Austin.

One of those in the crowd was James Baker, who in the closing credits played a song he had written about Bernie. (The refrain of his song went: “Bernie, oh, Bernie, what have you done? You killed poor old Mrs. Nugent, and didn’t even run.”) Baker told me he tried to get Bernie’s attention so he could wave at him and tell him that he was always welcome in Carthage. “I wanted to tell him that he had done so much good for us. But he was on his way to his new life. In a way, I can’t blame him. I hope it all works out for him. I really do.”