It is the Easter holidays and in a quiet Japanese school in West London, Danish director Lone Scherfig is shooting a scene with a school orchestra in an airy assembly hall.

With its dark wood the hall looks right at home in the early 1960s period in which An Education is set. 'I love to shoot in the UK,' the Danish director says over lunch. 'Even this little school - it's a beautiful location.'

The project marks the first produced screenplay written by bestselling novelist Nick Hornby since he adapted his own novel Fever Pitch for the screen more than a decade ago. An Education is set in a London on the cusp of momentous change. It is the story of a 17-year-old whose suburban life is rocked when she is swept off her feet by a mysterious older man.

Hornby adapted the screenplay from a short memoir written by celebrated journalist Lynn Barber. After reading Barber's piece in Granta magazine in 2003, he suggested it to his partner, film producer Amanda Posey and producer Finola Dwyer, who were looking to develop projects together. 'I thought it said a lot about the time, a lot about girls,' Hornby explains. 'I thought it was funny, I thought it was quite sad and unusual.'

Posey and Dwyer jointly optioned the piece. 'I hadn't thought about writing it,' Hornby explains, 'but then when (they) started to talk about writers I felt a twinge of jealousy and put myself forward.'

Hornby started work on the screenplay. 'I knew there was a central relationship between (the main character) and her father and a central relationship between her and this guy, and for her the dilemma was choosing between one kind of education and another. And that was my skeleton for the first draft.'

In autumn 2004, with a first draft complete, the producers took the project to David Thompson, then head of BBC Films. 'We talked to a couple of other people as well,' says Dwyer. 'But the BBC was the one we felt was the right home for it.'

Posey adds: 'It was just important to find the right people to collaborate with and the right environment to get the best out of Nick.'

BBC Films saw the potential straight away. 'The opportunity to work with Nick was a huge draw,' says Jamie Laurenson, an executive producer at BBC Films. 'There was a really powerful combination of comedy and pathos about the story that played so well to his strengths.'

With BBC Films on board, Hornby continued work on the screenplay and by early 2006 was on the third draft, with director Beeban Kidron on board.

The project was coming together and close to fully financed as a BBC Films project set to shoot in London and on the Isle of Man with backing from the island's film commission. The UK's Odyssey Entertainment was also on board to handle world rights on the film, excluding UK TV, which the BBC retained, and North America (now being sold by Endgame and Cinetic).

But shortly before Cannes last year, Kidron's Hippie Hippie Shake received the greenlight from Working Title and she dropped out of An Education.

The producers had seen Lone Scherfig's work (including Italian For Beginners and Wilbur Wants To Kill Himself) and met her in August 2007. The director, who shares an agency with Hornby, had already come across the screenplay. 'I read an early draft and liked it a lot,' Scherfig explains. 'I feel comfortable doing things that have that tone and I can identify with the main character.'

Once on board, Scherfig reviewed all the girls that had been considered for the lead role over the previous nine months, including Carey Mulligan who came back in to read and was cast. 'We feel that we've caught a star in the making and this will be her first starring role,' says Posey.

Peter Sarsgaard - who had originally been cast when Kidron was to direct - remained on board to play the mysterious David. Other cast members include Emma Thompson, Alfred Molina, Sally Hawkins, Rosamund Pike and Olivia Williams. Orlando Bloom had been cast but pulled out shortly before shooting because of scheduling conflicts. He was replaced by Dominic Cooper.

In October 2007 James D Stern's Endgame Entertainment also came on board, and the film was set to shoot in London. Endgame is financing with BBC Films and also cash-flowing the UK tax credit.

The seven-week shoot began in March. Locations included Oxford, Highgate mansion Witanhurst in north London, Walthamstow greyhound track in east London and Cafe De Paris in central London. Interiors have been shot at Twickenham Studios and the production spent a couple of days on location in Paris.

'The style we're shooting in has something in common with the English Free Cinema of the period,' Scherfig explains, 'and with the French films of the period - the Nouvelle Vague films which is again related to Dogme which is part of my cinema background.'

On shooting in Cinemascope, Scherfig says: 'I just want it to look real so the audience feels that the film recognises its audience. I always work with the audience in mind. I'm their representative to a certain extent. I think that goes with the job. And with this film you should feel Nick Hornby and not me. That's even more important.'

With delivery set for November, Odyssey is screening a promo reel at Cannes. 'We introduced the project last Cannes,' says Odyssey's Ralph Kamp. 'All the distributors reacted very positively to the script.'

Sales have been done with Israel (Shapira Films), South Africa (Videovision), Portugal (Lusomundo), Middle East (Phars Film) and Scandinavia (Nordisk).

At a glance: An Education

Director: Lone Scherfig

Producers: Finola Dwyer (Finola Dwyer Productions), Amanda Posey (Wildgaze Films)

Executive producers: David M Thompson, Jamie Laurenson, James D Stern, Douglas E Hansen, Wendy Japhet, Nick Hornby

Backers: BBC Films, Endgame Entertainment

Screenplay: Nick Hornby

Sales: Odyssey Entertainment (excluding North America, handled by Endgame and Cinetic)

Locations: Twickenham Studios, London, Oxford, Paris

Director of photography: John de Borman

Production designer: Andrew McAlpine

Editor: Barney Pilling

Cast: Carey Mulligan, Peter Sarsgaard, Alfred Molina, Rosamund Pike, Dominic Cooper, Sally Hawkins, Olivia Williams and Emma Thompson.