JONATHAN Asser has a declaration to make.

"I was never attacked, and I never attacked anyone else."

It is not the kind of tale one tends to hear from the screenwriting coalface, where tussles over lost lines are normally as gnarly as it gets, but then Asser is no ordinary first time film writer, and the movie he has written, Starred Up, is hardly a typical prison picture. Perhaps that is why it is rattling so many cages.

Starring Jack O'Connell, best known for his role in Skins, as a 19-year-old who is transferred prematurely from a young offenders' institution to an adult jail, the script won Asser the Best British Newcomer Award at last year's London Film Festival. Judges praised it for having an authentic voice. With its writer having spent 12 years in prison, as a psychotherapist, not an inmate, it should.

We meet in Glasgow before the Scottish premiere of the picture, directed by Glasgow's David Mackenzie (Young Adam, Hallam Foe), at the city's film festival. Asser had written a short film script, enjoyed it, and in 2004 he decided to use his experiences working in prison to write Starred Up. Mackenzie became involved in 2010, and they developed the screenplay from there.

Though prison dramas are a tried and true genre, Asser reckons they tend to fall down when it comes to portraying the relationship between officers and prisoners.

"In a real prison there is always the sense of an edge in interactions between officers and prisoners, and anything can happen. Particularly with extras in prison films, or even main characters, there is not that sense of edge that this guy could do something to me. People walk about almost as if it's a shopping mall or a park or a factory. It is not that. If you are within striking distance of somebody it means something can happen."

One film he marks out as coming closer to reality than any before Starred Up is A Prophet, the Cannes-winning French drama starring Tahar Rahim.

Starred Up was filmed mainly in Crumlin Road Gaol in Belfast. That gave the picture its look of authenticity, and the rest was up to Mackenzie, Asser, who was on set throughout, the main cast, and the extras.

Londoner Asser, 50, introduced the cast to prison language, such as "kanga" for prison officer, and "tech" for mobile phone, and he advised Rupert Friend (Homeland), playing the prison therapist, and Ben Mendelsohn (Animal Kingdom), portraying an inmate, about prison life. O'Connell preferred to immerse himself in his own way.

"He just did his thing and didn't need to really touch base with me at all. He did touch base with a couple of guys from my programme, ex-prisoners, and I think he may have found that useful." Two of Asser's contacts from his programme, originally cast as extras, ended up with speaking parts.

Asser's work in prison centred around reducing violence. If two prisoners had a beef, he would work with them to take the heat out of the dispute so they could live together in the same wing rather than one of them being transferred elsewhere.

"If we don't do that," explains Asser, "that problem gets passed down the line, it may end up in another prison when they reconnect, or it may end up back in the community outside and members of the public can be involved and get hurt."

One of those who travelled south to learn more about Asser's programme was Karyn McCluskey, the co-director of the Scottish Violence Reduction Unit, who visited Asser when he was at Wandsworth in London. Asser recalls her as "inspirational and gifted".

As Asser says while discussing his work, he was never attacked in prison and found the work highly fulfilling, but for outsiders, jail seems a stressful, depressing environment to spend time in, even if you can go home at the end of the day. Asser never saw it that way.

"For me it was a comfort zone. When I went into prison I felt at home, I felt safe because I am institutionalised myself." By that he means he was brought up in an all-male boarding school, then went to university, "another total institution".

He read English at university, then trained as a psychodynamic counsellor at various London colleges and hospitals. But it was as a poet and performance artist that he first entered jail to do a show at a young offenders prison. I'm intrigued as to how anyone makes a living as a poet.

"I didn't make a living as a poet is the short answer," he says, with a laugh.

On the success of Starred Up he should not have to rely on poetry alone to pay the bills. He has another script almost ready to go to his agent.

Pretty is set in the world of boxing, another tried and true genre, but the main character is an ex-prisoner trying to make a go of life outside. For Asser, the prison insider, the jail door has not quite closed yet.

Starred Up opens in cinemas on March 21