HERE'S looking at you, kid - again and again and again. It's 65 years since Casablanca was first shown in cinemas but the wartime-set romantic drama has lost none of its appeal for audiences.

Humphrey Bogart's final line as bar owner Rick Blaine, "I think this is the beginning of a beautiful friendship", was prophetic. Audiences have been in love with the movie ever since, leaving film-makers trying to figure out exactly what it was that attracted audiences to Casablanca, congregating at screenings like the characters in the picture seeking an escape route from Hitler's Europe during the Second World War.

Stories and rumours have grown up around the project - that the ending was undecided until shortly before the scenes were shot (true); that Ronald Reagan was in the running as leading man (half-true), and that someone actually said "Play it again, Sam" (they didn't).

To be honest, there wasn't much point asking Dooley Wilson, cast as the pianist in Rick's bar, to play anything as he was a drummer. He faked the piano playing, mimicking the hand movements of pianist Elliot Carpenter, who was tinkling the ivories behind a curtain out of camera shot.

Now cinemagoers can take another trip to Casablanca in a digitally remastered print being released in cinemas. As time goes by - to quote the title of the movie's famous song, borrowed from a 1931 Broadway musical - the acting, script and direction still exert a hold as Ilsa dithers between staying with former lover Rick or flying off into the sunset with resistance leader husband Victor Laszlo. They, along with countless others, are trying to secure exit visas from French Morocco to escape the Nazis.

"Refugees escaped from the Gestapo in Casablanca and brought its story to the screen," proclaimed the 1943 UK press release. It relates excitedly that "the international swarm of writers and players at Warner Bros studio heard stories and word passed to Jack L Warner and his associate producer Hal B Wallis. They seized on the idea as something new. Action followed fast".

That was the dramatic version of events. The script was based on a one-set, unpublished play, Everyone Goes To Rick's, by Murray Burnett and Joan Allison. Warner Bros paid $20,000 for the rights and set various writers loose on preparing a script.

They were still pounding away on their typewriters as filming began, with the ending tantalisingly unresolved. Co-writer Julius Epstein later recalled that "Warner has 75 writers under contract and 75 of them tried to figure out an ending".

Whether the moral guardians of celluloid decency would have allowed married woman Ilsa to desert her husband for old flame Rick is debatable, but Ingrid Bergman was worried by the question mark hanging over the resolution to Ilsa's romantic dilemma.

Another of the writers, Howard Koch, recalled her approaching him on set and asking "Which man should I love more?'. He couldn't give her an answer. "I said to her 'I don't know, play them both evenly'. You see we didn't have an ending, so we didn't know what was going to happen."

Warner Bros, the press release claimed, "splurged out" on stars although an economic not artistic decision led to Bergman being cast. Hedy Lamarr and Ann Sheridan were names mentioned for Ilsa and French actress Michele Morgan might have got the role if she hadn't asked for $55,000. Producer Wallis knew he could get Bergman for considerably less, $25,000. Lamarr did go on to play Ilsa in a 1944 Lux Radio Theatre production, opposite Alan Ladd's Rick.

Bogart was a more clear-cut choice. Wallis had been asked by Warner to find him a new screen role and Rick was considered ideal, which was bad luck on George Raft, known for his gangster roles, who'd been angling for the part.

Newspaper reports linked Reagan and Sheridan with the leading roles but the stories were planted by publicists in an effort to publicise the pair's forthcoming movie Kings Row.

Warner Bros filled out the cast of Casablanca with a glittering array of stars including Claude Rains, Paul Henreid, Peter Lorre and Sydney Greenstreet. There was some doubt about Sam's sex, with singers Lena Horne and Ella Fitzgerald both contenders for the role.

Director Michael Curtiz was Hungarian with an accent that caused a few problems on set, like the time he demanded a poodle from the props department. After hunting high and low, a dog was brought forward for his approval. Curtiz wasn't amused. "A poodle. A poodle of water," he told them.

The film's budget of just under $1m dollars was the highest for any 1942 production, although many sets were recycled from other Warner movies. Apart from the opening airport sequence, the picture was shot entirely on Hollywood film stages.

The memorable final scene at the fog-shrouded airport was filmed on a sound stage because wartime restrictions ruled out working at a real airfield after dark. The story goes that the Rick/Ilsa/Victor scene was played out in front of a small cardboard cut-out plane, using forced perspective to make it look bigger and little people as air crew to further the illusion.

With three Academy Awards, including the best picture Oscar, Casablanca proved itself. If people could work out why it has proved so popular and so enduring, they'd have found the Holy Grail of film-making. What seems likely is that the combination of colourful characters, love triangle, honourable actions and self-sacrifice set against a background of the Second World War is what's made the picture irresistible to audiences over the years.

Real life events helped give the film an air of topicality. The first publicity releases had to explain where Casablanca was, but the movie had the good fortune to be released as the American Expeditionary Force marched into the town.

Warner Bros was quick to put the film into cinemas around the world, although predictably it was banned for years in Germany and then shown in a heavily edited version that removed references to Nazis. In London, the film opened in January 1943 with simultaneous premieres at the Warner and Regal cinemas before being shown around the country with such tag lines as "Mysterious city of sin and intrigue" and "They had a date with fate in Casablanca".

In the past 60-odd years people haven't been able to leave the film alone. A sequel, Brazzaville, was mooted but later abandoned. There was a colourized version and a specially re-edited version shown at the 1987 Rio Film Festival which saw the ending changed so that Ilsa didn't get on the plane but fell into Rick's arms. The play itself was eventually staged to considerably less success than the movie.

Perhaps the sneakiest thing occurred in the 1990s when someone took the script, removed the title, changed the names, and then sent it out to the Hollywood studios. Every single one of them turned down the script.

nCasablanca (U) is showing at Newcastle's Tyneside Cinema, currently housed in the Old Town Hall, Gateshead, on Sunday.