Bernie Tiede's unlikely story of friendship and murder was adapted by Richard Linklater in 2011 – and now the freed killer will live with the director as part of his bail terms

Bernie Tiede, the convicted murderer depicted in Richard Linklater's dark comedy Bernie, is to be released from prison early – with the caveat that he must live in an apartment above Linklater's garage.

Tiede's story was already strange enough to make perfect movie fodder: he was a funeral director who befriended an elderly and wealthy local woman, taking foreign holidays with her and quitting his job to become her business manager. They became so close that she wrote him into her will, but Tiede said he was driven to murder by her increasingly demanding temperament – he shot her in the back of the head and stored her body amid food in a freezer.

He confessed to the crime in 1997, months after the killing – in the meantime he'd spent thousands of dollars of her money, added to money that he'd given away to local causes while she was still alive. Linklater adapted the extraordinary story for the screen in 2011, with Jack Black in the title role plus Shirley MacLaine and Matthew McConaughey also starring. Black's performance was widely lauded as having a newfound nuance, and earned him a Golden Globe nomination.

Tiede was given a life sentence for his crime, but that has now been shortened to time served. The process began when an attorney, Jodi Cole, saw Linklater's film and approached him after the screening, saying she felt the case didn't add up. Cole reviewed the case, and discovered that Tiede had been sexually assaulted as a teenager but had been too embarrassed to mention it during the original trial. The new evidence convinced the prosecuting attorney to request the reduction in the sentence, which was granted, pending approval by a criminal appeals court. In the meantime, Tiede will live in Linklater's apartment under bail terms that include him having to stay within Austin, work as a legal clerk for Cole, and attend counselling sessions.

In court, Linklater stated: "I was very impressed in prison how the other inmates looked up to [Tiede]... He seemed to be a very positive force in a negative environment. Myself and others are determined to help him in any way we can." In an interview at the time of the film's release, he called Tiede "a sweetheart of a guy... there's really no darkness in Bernie... He's kind of dignified, straight-ish, in a small, southern town. I think it's less and less that way, thankfully, but every church has that lifelong bachelor who's really sweet and leads the choir and everyone likes him and, he's gay. And he's really religious, too. I mean, it's a tortured life, in a way, to not really be yourself."

Black echoed his comments in an interview with the Guardian: "Bernie just bottles it up when people hurt him as he has no release valve and he's such a sweetheart. I think that was his fatal flaw."