Here's a story. The world's greatest director, an obsessive perfectionist, decides to make a film about sex, or rather, the definitive film about sex. He says, 'I've got to find out how far you can take the aesthetically erotic - at what point, if any, it gets to be such a personal thing that it becomes meaningless.' He convinces the biggest film stars in the world to go along with the project, exploring the darkest corners of sex - including necrophilia - at the risk of ruining their ultra-clean reputations, all for art. And he shoots the film in Europe, away from the prying eyes of the studios. After this, all other erotic films would be redundant.

The scenario comes from Terry Southern's 1970 satirical novel Blue Movie. But it can also serve as the story of the conception of Eyes Wide Shut. And that may be strange, but not surprising: Southern had written the script for Kubrick's Dr Strangelove, and Blue Movie's dedication is 'For the great Stanley K'. Two years before Southern's book came out, his friend Stanley Kubrick had acquired the rights to Arthur Schnitzler's Traumnovelle, from which Eyes Wide Shut was adapted. And ever since the first rumours about the film emerged, the anticipation has been that Kubrick was going to achieve what his fictional alter-ego was attempting - Hollywood's first erotic masterpiece.

Two weeks before the film comes out in the US, we finally know something about it - as long as Alexander Walker's early Evening Standard review, doesn't turn out to be yet another fantastic red herring. Tom Cruise and Nicole Kidman don't, it transpires, play psychiatrists who use their patients to explore the byways of sex - as was rumoured since the film's conception. They play a married couple who both start to feel tempted away from the path of virtue after a grand New York party. And while Kidman is frequently nude, it's Cruise who goes off to have adventures in the dark streets, meeting a prostitute and eventually sneaking into an enormous and sinister orgy where the participants wear Venetian Carnival masks.

So we think we now know that the film isn't quite as explicit as the many rumours have suggested. We also know - despite all the stories about Kubrick's (and Cruise's) incredible power over Warner Brothers - that the American version of the film has been subtly censored by Kubrick himself, with digitally added figures covering some of the couples in the orgy. Here - British Board of Film Censors willing - we'll see the real thing. And we know, sadly, that Cruise doesn't do a transvestite turn at Madam Jo Jo's. But even if Christiane Kubrick, the director's widow, says that Eyes Wide Shut 'has nothing to do with sex and everything to do with fear', it stands alone in American film history. A major studio, and major stars, have never attempted anything quite like it before.

Ever since the Hays Code came into force in 1930, specifying a moral framework for film-makers, Hollywood has been cautious about sex - even while it has been accused of saturating the world with the stuff. Of course, there's the traditionalists' claim that cinema's greatest erotic charge came when you could see the least: it was all in the words flung between Bogart and Bacall, and Tracy and Hepburn. But that genie was let out of the bottle in the late Sixties, and can't really be put back in - despite the honourable efforts of Steven Soderbergh's Out of Sight.

But hopes, or fears, that the Seventies would lead to complete sexual frankness in the movies didn't come about either. When Southern was writing Blue Movie, it seemed - with the revolutionary spirit of films like Antonioni's Zabriskie Point and its hillside open-air orgy - that films would soon be full of real sex. There seemed to be a convergence of mainstream Hollywood, the sexually explicit New York underground films of Andy Warhol and Barbara Rubin, and the porn industry. For a brief moment in the early-1970s, real porn went overground with Deep Throat, The Devil in Miss Jones and Behind the Green Door.

And as late as 1980, Penthouse owner Bob Guccione could tempt Peter O'Toole, Helen Mirren and John Gielgud into starring in his $15 million Caligula, by anyone's guess the most expensive and star-laden dirty movie ever made. But by the time it was released into the Thatcher-Reagan world, it was an anachronism, as well as a huge failure.

Even in the Seventies, Hollywood kept a distance. Think of the most famous sex scenes involving mainstream stars - Brando in Last Tango in Paris, Donald Sutherland and Julie Christie in Don't Look Now, Kathleen Turner in Crimes of Passion - and you'll find the un-American sensibilities of Bernardo Bertolucci, Nic Roeg and Ken Russell behind the camera. Caligula may have been backed by Guccione, but it was directed by the notorious Italian, Tinto Brass.

In America in the Eighties, sex seemed only acceptable when viewed in the light seeping through Venetian blinds. The master of the art was Adrian Lyne, a British ex-ad director whose eye frequently wandered off the couples and on to the apartment fittings. Watch the key sex scene in Fatal Attraction and see how carefully the sink is shot, watch any scene in 9½ Weeks and appreciate how much better Lyne is at decor than at human bodies in motion. And although Lyne made millions and millions of dollars for Hollywood, when he remade Lolita he was shunned. Its subject was felt to have been too sensitive for Tinseltown's pet smutmaster, a man who was no match for Stanley Kubrick and his discreet 1962 version. Mickey Rourke's attempt to rediscover the success of 9½ Weeks in films like Wild Orchid and Another 9½ Weeks saw him slide away from acceptability too, into the obscurity of soft porn.

Between Hollywood proper and the massive San Fernando Valley porn industry lies the world of straight-to-video erotic thrillers, all starring Shannon Tweed or Shannon Wirry, always promising more sex than they deliver, and ready to clog up the schedules of Channel 5. In a way, they are po-faced heirs to Russ Meyer, who had a long and successful career parallel to, but never part of, the system. Adrian Lyne's spiritual successor was Paul Verhoeven, providing just the right level of titillation with Basic Instinct and apparently too much with Showgirls.

But in terms of both what they showed, and the variety of sexual possibilities on offer, these films were tame compared with the films that Verhoeven had made in Holland two decades before. From the days when art-house cinemas thrived simply because serious Swedish films were also open about sex, one truism has remained true: Europeans (and Canadians) are happier with sex in the movies. In Spain, Bigas Luna could make a film like 1990's Ages of Lulu, which includes gay S&M, transsexual prostitutes and a woman having a threesome with her brother and her husband, and then go on to bright mainstream success with Jamón, Jamón.

Recently, the spirit of the Seventies seems to have resurfaced in Europe, the desire to push forward the boundaries of sex in the cinema becoming once more an almost political gesture. There was, for instance, Lars Von Trier's The Idiots, with its apparently genuine orgy, as laid down by the strictures of the Dogme 95 movement. Convinced that The Idiots was art, the BBFC let the film - complete with erect penises - on to our screens. And they were right: The Idiots, like Last Tango in Paris, is a film so grindingly devoted to its art that anyone foolish enough to watch it for the sex is crazy.

But the controversy about The Idiots has been eclipsed by French director Catherine Breillat's Romance, a film that has had hardened film critics spluttering. Like Eyes Wide Shut, Romance is the story of a couple who start to wonder if they're getting everything they need within their relationship. What they opt for includes S&M and a truly bizarre fantasy sequence. Breillat - like Von Trier - took the precaution of using porn veterans for scenes that required erections on camera: mere actors couldn't be trusted. The BBFC is still trying to decide what to do with it.

Eyes Wide Shut clearly is not going to be as explicit as Romance or The Idiots. Nor will it be as strange as David Cronenberg's Crash. But what it offers us is the world's most famous film star couple playing out strange desires on film. That is unique, and that's why the early trailers had America so excited. There's also the anticipation of what Kubrick can bring the film: he mastered film noir, the war film, the Roman epic, satire, sci-fi and horror in turn: why not a dark erotic drama?

And whatever happened on set, it was surely the opposite of the 1970s approach of just putting two actors on a bed and letting them do their thing. Can a scene retain a sexual charge when you reach the 50th take? Did he orchestrate every one of the dozens of masked couples in the orgy? In one way, Eyes Wide Shut is already the greatest film about sex ever made. With big films, the two hours spent in the cinema is only the climactic part of how you've experienced the film. The months of build-up are every bit as important, sometimes so much so that you don't actually need to see the film.

And, ever since the initial choice of Cruise and Kidman - so seemingly clean, but subject of so many nasty rumours - everything about Eyes Wide Shut has added to the anticipation. The lengthy shoot, the firings, the rumours about why Harvey Keitel was fired, the stories of scenes shot in Soho clubs, the 'accepted' truths about the script which turn out to be wrong, the incredible secrecy and finally Kubrick's death just as he finished the film, leading to speculation the film would never come out at all. Whether the film turns out to be any good, Eyes Wide Shut will always be remembered as the longest, biggest and most spectacular tease in film history.

 Eyes Wide Shut opens in the US on 16 July and in the UK on 17 September.