On Saturday afternoon, just 12 hours before he died, Stanley Kubrick was his usual, expansive self. Sitting in his famously private home in Hertfordshire, surrounded by all the trappings of the nerd, Kubrick was engaged in a surprisingly mundane activity: the workaholic director was glued to the television, watching the Ireland-England rugby match.

Proving that he could engage in more than one activity at a time, Kubrick was also on the telephone to an old friend and colleague. While the two were supposed to be discussing the poster design for his latest film Eyes Wide Shut, Kubrick was providing a running commentary on the match, obsessing on the England scrum-half Kieran Bracken.

"I kept saying, 'Stanley, will you go away? I'm trying to watch the rugby too.' " Julian Senior, the grandly titled senior vice-president of European advertising and publicity at Warner Bros, the studio behind Eyes Wide Shut and every other Kubrick film for the last 19 years, was trying to make the most of his weekend.

Kubrick, however, was having none of it. "Stanley did not understand what weekends were," says Senior. "His work was his life. He was excited about the release of the film. He wanted to talk about the publicity schedule. It was the same voice we'd known for the last 20 years - young, vibrant. He'd had flu a couple of weeks ago but apart from that there was no hint of illness. He said: 'Let's think about what we're going to do. Get me a list of the top four or five magazines and the best writers. We'll do a few interviews.' "

Kubrick had finished an 80-second trailer for the film, to be shown tomorrow before an audience of 3,000 polyester suits at ShoWest, the forum for American exhibitors. But it is not just the polyester suits who are excited at the prospect. With speculation about the film at fever pitch before the director's death, the rumour mill has gone into overdrive since he died in his sleep at 4 o'clock on Sunday morning.

With a 15-month shoot, and over two-and-a-half years since the project got underway, Eyes Wide Shut had become one of the longest ever film productions. The question "Will he ever finish it?" had moved from humour to anxiety. On his death, the fans were sent into a state of panic, clogging up Internet chat lines with speculation about what the studio might do to the master's film. With Kubrick reportedly having a clause written into his contract that a film could only be released when he said so, and only in the final version he submitted, there were fears that Eyes Wide Shut would never be shown on a public screen.

Like A Clockwork Orange, which Kubrick withdrew from exhibition in the UK following the outcry over its effects on an impressionable youth and an even more impressionable establishment, it seemed that an unfinished Eyes Wide Shut might never be released. After all, could anyone imagine the ultimate perfectionist allowing anyone else to finish his film, even from the grave?

There have been several Kubrick projects over the years that have not seen the light of day, including an eastern European project and the rumoured - everything was rumour with Kubrick - film before Eyes Wide Shut, titled AI, shorthand for "artificial intelligence". Film-makers have an unhappy habit of dying mid-production, and many have left treatments behind which have been shot by their successors. Seen the new Kurasawa movie? Not yet, it is only just going into production. A year after the Japanese director died, his director of photography is shooting a script left behind by the master. And the habit of bringing in a director to finish someone else's work - usually because of a falling out with a studio or a star - led to Kubrick's decision to leave Hollywood and settle in England. Brought in to take over from director Anthony Mann on Spartacus, Kubrick's experiences with star and producer Kirk Douglas convinced him that the only way to play the Hollywood game was on his own terms.

But for once the paranoia surrounding Kubrick was misplaced. "The film that will be released is Stanley's film," says Senior. "The film is over, the trailer is done, he was working on the poster artwork. We'd even talked about which stills to use for the publicity." Then Senior, with his smooth, comforting Bob Monkhouse voice, chooses a strange turn of phrase. "Stanley finished with his life less than a week after he finished with his movie. If you'd stood back and written it, people would have laughed."

The polyester suits behind the American movie industry will not be the first to see the finished film. That privilege came on Tuesday last week, to an audience of just four. In the screening room at Warner's New York headquarters on Fifth Avenue were the company's two co-chairmen, Terry Semel and Robert Daley, and the film's two co-stars, Tom Cruise and Nicole Kidman. None of them, it is safe to say, were wearing polyester suits.

The screening was an emotional affair. It was held in New York to suit the stars. Cruise was in New York with his wife before flying to Australia to begin work on the sequel to Mission: Impossible. Kidman was nursing a sore throat, the product of her Broadway run in David Hare's The Blue Room, which transferred from London earlier this year.

"Nicole and Tom were both weeping," says a source at the company. "Nicole kept saying, 'He was like a father figure to me'."

The film, the sole print to date, was taken by a member of Warner's staff from Kubrick's home near London to New York and then flown back the same day. As ever with Kubrick, secrecy was everything. Before and during filming, Warner's executives were reportedly shown the script in a London hotel. Kubrick would not allow them to take the screenplay, which was amended every day by Kubrick, out of the room. It even seems unlikely that co-writer Frederick Raphael knows too much about the final shape of the film.

But now, with a July release fixed for the US and the rest of the world pencilled in, starting with the UK in late August, tongues are looser about the film. The 70-year-old director reportedly called it his best film, and Warner's - or at least the two people at Warner's to have seen the film - say they are delighted with the finished result. Loosely based on Arthur Schnitzler's 1926 short novel Dream Story, the German writer whose version of La Ronde provided the basis for Hare's The Blue Room, Eyes Wide Shut is the story of two sexual psychologists whose work crosses over into their personal lives. According to Kubrick, in a rare comment about the film: "It explores the sexual ambivalence of a happy marriage and tries to equate the importance of sexual dreams and might-have-beens with reality."

The film moves the action from Vienna to present day New York. Shot at Pinewood and laboriously reconstructed locations around England, it goes from a masked ball featuring hundreds of extras to a smaller masked orgy. Cruise's character is called Bill. Other than that, and some of the details of the location shooting, little is known.

"The couple's fantasies intersect and interact with their real lives," says Senior, who has seen "most of the film. Possibly that's the thread that connects it to his other films. Stanley had this thing about trying to control the uncontrollable. HAL, the computer in 2001, is supposed to deliver total control but becomes uncontrollable; the aversion therapy in A Clockwork Orange produces a quite different result to that which was intended; in Full Metal Jacket, the soldiers being turned into killing machines for the Vietnam War turn in upon themselves." And now we have Cruise and Kidman playing a Manhattan couple charged with helping other people through their sexual dysfunction who find their dreams seeping into their reality - again, the theory cannot cope with the reality.

If the subject matter sounds difficult - and films about sexual dysfunction have a habit of bombing commercially - Warner's is confident about the prospects for Eyes Wide Shut. "It will have enormous appeal," says Senior, "Hollywood's favourite couple in a movie about sexual obsession and jealousy. One of the things I was due to talk with him about on Sunday was the Venice film festival. They'd already approached us and if somebody says we want to open the festival with Stanley Kubrick's film as a tribute, it would be churlish to turn them down."

And the rumours that there is still work to be done on the film? Kubrick would almost certainly have continued to tinker. He was known to attend cinemas screening his films to check that the projection and sound levels were right. Perfectionist? As one collaborator said: "There's nothing wrong with being a perfectionist." Tom Cruise, however, might disagree, and reportedly asserted his influence as a star during the filming of Eyes Wide Shut, telling the director that he probably had enough to work with when asked to do his 50th take walking through a door. Kubrick ended up with a million feet of film, which he has managed to edit down to two hours 21 minutes, the same length as 2001.

Following the New York screening, work will continue as normal, preparing the film for certification in the US, and then dubbing it for foreign territories, a process Kubrick would normally have worked on himself together with a translator. "Now the movie comes back, Stanley goes through the normal routine he always does," says Senior. "Does? Did... did - the word is what Stanley did."

What's in the can: a sneak preview

By Andrew Pulver

The origins Kubrick first went on record in 1972 saying he'd like to adapt Arthur Schnitzler's Traumnovelle (Dream Story) - the same writer whose well-known play La Ronde was the source of Nicole Kidman's recent stage hit, The Blue Room. In the same year, Frederic Raphael published Who Were You With Last Night?, supposedly a novelisation of a Traumnovelle screenplay he'd written for Kubrick, but was shelved in favour of Barry Lyndon. Filming finally began November 4, 1996, and finished some time in June 1998.

The story Traumnovelle is set over a single night in Vienna, and has as its principal characters a doctor and his wife, Fridolin and Albertine. Kubrick described it to French critic Michel Ciment as follows: "The book opposes the real adventures of a husband and the fantasy adventures of his wife, and asks the question: is there a serious difference between dreaming a sexual adventure, and actually having one?" Kubrick and fellow scripter Frederic Raphael updated the story to contemporary New York, focusing on a married couple, both psychiatrists, who embark on a series of fantasy-fulfilling escapades involving sex, drugs and transvestitism.

The cast Kubrick cast Tom Cruise and Nicole Kidman, and reports attest that they agreed to plentiful nudity and graphic sex scenes - so much so that Eyes Wide Shut is in danger of scoring a financially disastrous NC-17 rating in the US. Cruise reportedly dons women's clothing, and newspaper reports claimed that a leading clinical psychiatrist was brought on set to teach Kidman how to replicate a heroin injection authentically. High-profile casualties of the 18-month shoot include Harvey Keitel, who left after six months (no explanation was given, but Keitel has clashed with dictatorial directors before, notably being replaced on Francis Ford Coppola's Apocalypse Now); and Jennifer Jason Leigh, who had begun shooting the lead role in David Cronenberg's eXistenZ before Kubrick decided to reshoot all her scenes. Replacements were Sydney Pollack (director of Sabrina and The Way We Were; actor in Husbands And Wives) and Swedish actress Marie Richardson (The Best Intentions).

The locations Kubrick's well-known aversion to leaving England meant that, like Full Metal Jacket and Lolita, a foreign environment was simulated over here. Pinewood Studios, just outside London, housed most of the sets. Street scenes were filmed in London's Hatton Garden and Worship Street, both dressed to resemble New York. Kubrick filmed the climactic masked-ball-and-orgy at Elveden Hall near Bury St Edmunds, and Highclere Castle near Newbury. Another party scene was filmed at stately home Luton Hoo. Most notoriously, however, the production pitched up at transvestite cabaret bar Madame JoJo's in London's Soho. Scenes were also filmed at Hamley's toy store in Regent Street.