Helen Hunt and John Hawkes in <i>The Sessions</i>.

In session … Mark (John Hawkes) and his therapist (Helen Hunt) get to work.

Mark O'Brien can only move his head. Not all the way round: just within 90 degrees, from facing front to his right shoulder. It's not that he is paralysed, he explains at one point during Ben Lewin's film The Sessions, just that childhood polio has left him with muscles that don't work. His penis, however, works perfectly well; his problem is that he can't move his hands to touch it himself and although people handle him all day - washing him, feeding him, moving him around - nobody else touches it, either. At age 38, he tells his priest, he wants to have sex. Not just the kind of sex you can pay for, but sex with care and gentleness and perhaps, one day, with love.

The Australian filmmaker came across the story of O'Brien, a journalist and poet who died in 1999, when he read O'Brien's article On Seeing a Sex Surrogate on the internet. Lewin also had polio as a child and walks with difficulty. His wife and producer, Judi Levine, remembers him coming up the steps to their house in Los Angeles from his office in their garage, urging her to read O'Brien's minutely frank account of his sessions with a feisty therapist who helped him learn to enjoy his body, whatever its limitations.

''Ben was obviously very moved by it,'' she says. ''I think as much as this film speaks to everybody, it really resonated with him about stuff he would have gone through as a young man with a disability at university during that sexual liberation period. I think it would have touched him viscerally in ways that he had never really been able to articulate himself, something he would have deflected as not really that big a deal.''

Lewin had worked on the television series Ally McBeal and made features including The Favour, the Watch and the Very Big Fish, but jobs were scarce and the Lewins were preparing to move back to Australia. Now, however, he had found his American story.

Helen Hunt plays the sex surrogate Cheryl Cohen Greene with great warmth and considerable chutzpah, given she is naked for most of her scenes. John Hawkes, who was nominated for an Oscar for his sinister performance as crystal meth addict Teardrop in Winter's Bone, plays Mark O'Brien. Hawkes's first question to the director, he says, was why hadn't he found a disabled actor to play the role. ''There are a lot of disabled actors,'' he says quietly, ''who don't work a lot.''

Having got his answer - Lewin had been looking for years, but not found the right person to play Mark - Hawkes set out his vision. ''I spoke of the situation being so fraught at the outset we should try to find humour wherever we could,'' he says. ''I thought it would be important to fight self-pity and Ben was completely in accord. He said, 'I'm tired of disabled people being played as either victims or saints. Mark should be an asshole at times. He should be a human being.'''

Hawkes had a second rule that, he says, worried Lewin more: he didn't want to use a body double. This presented a significant physical challenge since Cohen Greene had written in her notes that she thought the curvature of his spine might make intercourse impossible. Hawkes had a ball under his back to force that twist in his body which was, he says, very uncomfortable.

''Yoga was key, for several reasons,'' he says with a slightly pained smile. ''Firstly for meditation, just to try to maintain a stillness. And to learn Mark's body position. Feet turned in, left hand turned, right hand spun under and kept back. I remember going to my chiropractor and him telling me he thought my organs were literally migrating from lying on the ball in positions for too long at a time.''

What is perhaps most remarkable is that he delivers a performance of tremendous force without being able to move, although we don't think about this while watching the film. He didn't think about it either. ''Thought registers on camera; you don't have to do a great deal. Even though my close-ups were horizontal, I thought the worst thing to do would be to try to mug or face-act. The physical limitation and physical discomfort notwithstanding, by the time the camera rolled the first day I realised this was another regular acting role: a human being talking to another human being.''

Mark O'Brien could hardly have put it better himself.

The Sessions opens on Thursday.