The James Bond series is one of the most successful film franchises in history, even if the latest instalment, No Time to Die, has been plagued with problems and is now delayed, again, until the autumn. There was a stir last year when it was revealed that Phoebe Waller-Bridge had been hired to work on the script, but the series has called on famous writers before — including Roald Dahl (You Only Live Twice), George MacDonald Fraser (Octopussy) and Anthony Burgess (The Spy Who Loved Me).

However, one writer is rarely mentioned in connection with the series: Joseph Heller. Fittingly, the story of how the author of Catch-22 tried to write a Bond film is one filled with chaos, paranoia and obsession.

In early 1965, four years after Catch-22’s publication, Heller received a phone call from Charles K Feldman, one of Hollywood’s most powerful figures. Feldman’s talent agency Famous Artists represented everyone from Marilyn Monroe to Gary Cooper, and from the late 1940s he had also produced movies, notably A Streetcar Named Desire and The Seven Year Itch. In late 1960 he had obtained the film rights to Ian Fleming’s first novel, Casino Royale, but a few months later had been leapfrogged by producers Cubby Broccoli and Harry Saltzman when they bought up the rest of Fleming’s work. By early 1962 their company, Eon Productions, had started filming Dr No in Jamaica, and a year after that they embarked on From Russia with Love.

Broccoli had previously worked at Famous Artists, so it probably niggled Feldman that his former protégé had beaten him to the punch. But Eon’s breakthrough also meant he now owned the rights to a book whose hero was a proven box office success. Deciding to produce a rival Bond film, Feldman commissioned several scripts, including one by the legendary screenwriter Ben Hecht that retained much of Fleming’s novel while incorporating the larger-than-life action sequences and sardonic humour of Eon’s films. But when Hecht died of a heart attack two days after completing his script in April 1964, Feldman steered the project in a radical new direction. Inspired by another film he was producing, the madcap comedy What’s New Pussycat?, he began looking for writers to reshape Hecht’s material into something much more extravagant — a “Bond movie to end all Bond movies”.

This led him to Heller, whom he offered $150,000 to work on Casino Royale for a fortnight. Heller, by his own account “a pushover for pretty girls, booze, easy money, fame and frivolity”, agreed, and brought in a childhood friend, novelist George Mandel, to help out. The job would be undemanding, Heller figured: after all, “there was no danger of failing, since somebody else had already done that”.

Ursula Andress in a publicity image for the 1967 film Casino Royale, perhaps the greatest squandering of talent in cinematic history.

Heller later wrote a long account of his and Mandel’s experiences with Feldman. Titled How I found James Bond, lost my self-respect and almost made $150,000 in my spare time, it’s a brilliant satire of the film-making business that has several Catch-22-ish moments: Feldman, paranoid that everyone wants to steal ideas for his film, initially refuses to let Heller see the script he’s hired him to rewrite, and then has his Bulgarian bodyguards follow him round New York to ensure he doesn’t talk to anyone about the project.

All the script material for Casino Royale is stored in the Charles K Feldman Collection at the American Film Institute in Los Angeles, where it has been sitting unread since it was donated by Feldman’s family in 1969. For most of that time the collection has been closed to the public, but it is now open again. The collection includes more than a hundred pages of Heller and Mandel’s material, and shows the two taking on the challenge of writing a Bond with gusto, while grappling with a producer who didn’t know what he wanted, and wanted it by yesterday.

James Bond vs. Josef Mengele

On February 21, 1965, Heller wrote a letter to Feldman attaching 67 pages of script material, representing about a third of the film, “rewritten and rethought thoroughly from top to bottom and end to end, with many locations and names changed and with a number of wholly new scenes written and inserted.” Heller promised to deliver more scenes in a few days, which would give Feldman about half of his film. “The question is, what are you going to do about the other half?” He then refers to “Sayer”, meaning Michael Sayers, an Irish writer Feldman had hired. “If you have not put Sayer to writing — and writing with extreme care and originality — those parts I suggested he work on in my letters to you last week, you might find yourself with half a picture that might be good enough to win an award — if they gave awards for half a picture.”

This bitingly sardonic admonishment feels like Heller putting his foot down. Feldman was treating him like a hack, keeping him incommunicado with other writers so they were unable to match up their ideas. “The time may be at hand,” Heller wrote, “when it is necessary to put Sayer and us in touch with each other — or at least to show him the sections we have redone.”

Heller’s emphasis on “extreme care and originality”, and by extension his own professionalism, is fully justified by the accompanying pages. They begin with a virtuoso opening sequence with Bond in the Caribbean stealing microfilm, winning at roulette, blowing up a submarine and getting the girl. Heller and Mandel had gone to see Goldfinger to prepare, and there are similarities to the opening of that film: a tropical coastline, a bomb planted by Bond that goes off while he is living the high life — he even wears a white dinner jacket. But it’s exciting, glamorous, amusing, somewhat ludicrous and very neatly put together: a Bond film in miniature. Bond himself is perfectly pitched, a deadly professional carrying out a tense mission but also devil-may-care with it, coolly executing all his necessary tasks to circle back to the girl just in time.

The remaining pages feature several elements one might expect from Joseph Heller: subversive, sly humour with lashings of absurdity. The villains are a front group for Smersh based in the Middle East calling themselves the Society for the Collection and Harnessing of Mundane, Elemental and Cosmic Knowledge, or Schmeck. Schmeck is a Yiddish word meaning a tiny portion of food, while schmeckel means small penis — evidently Heller and Mandel were having fun.

The name aside, Schmeck is treated as straight rather than lampoon, essentially a stand-in for Smersh. The main villain is Colonel Chiffre, who sniffs cocaine through an inhaler and wears a gold octopus lapel badge that squirts real octopus ink. He is using beautiful au pairs trained at a honeytrap school on the French Riviera to seduce the West’s leading politicians and nuclear scientists, whom he then blackmails with the compromising films. Assisting Chiffre are his cousin Helga, a countess who has escaped trial for her work at Buchenwald, and Fleurot, whose favourite toy is an electric cattle-prod. M sends Bond to find and destroy the blackmail films, and to beat Chiffre at baccarat to put him in MI6’s debt against Schmeck. Bond is outfitted with an array of gadgets by MI6’s research and equipment boffin Powell — Q in all but name — including glasses that double as a transmitter, and a cigarette lighter that, if provided with its pair by another agent, will trigger a small atomic bomb.

The villains are a front group for Smersh calling themselves the Society for the Collection and Harnessing of Mundane, Elemental and Cosmic Knowledge, or Schmeck.

The papers also include material dated February 26, which runs to 31 pages and includes a car chase with Bond in a Rolls-Royce attacked by rocket launchers in a Marseilles plaza. We also meet Dr Lili Wing, who runs the honeytrap training school; Bond has bribed her to turn on the others, but she ends up frozen to death in a locker in a fish-freezing factory. A further 14 pages from March 1 contain the baccarat duel between Bond and Chiffre. This sequence is largely faithful to Ian Fleming’s novel, but includes the death of one of Bond’s close allies from the books, the French agent René Mathis, who is strangled by Countess Helga as he listens in to Bond’s transmitter from the casino manager’s office.

All this represents about half of the film, and is hugely entertaining. The skeleton of Fleming’s novel can still be seen, as can several elements from Ben Hecht’s scripts, but it has its own tone, with a real sense of menace and suspense. While there are comedic elements, this is not a spoof of the series but a traditional Bond film, with M, Moneypenny, spectacular action scenes, gadgets, sadistic villains and beautiful women.

The papers also include a revised outline of the whole film by Heller and Mandel from March 8. Fifteen pages long, this is notably much more over the top. Colonel Chiffre now reports to none other than the infamous Nazi doctor Josef Mengele. The brilliant Caribbean opening sequence has gone, replaced with Mengele in a surgery being interrupted by Bond as he operates on a patient’s skull. It transpires that he is removing the brains of leading scientists and storing them at Schmeck’s headquarters: “In a long tier of glass cases, naked human brains are seen immersed in a chemical bath from which electrodes lead to computers. Scientists work among these brains and computers, taking information.”

In the film’s second half we meet Vesper Lynd, who as in the novel assists Bond while secretly working for the enemy. In one scene, Chiffre tortures Bond by throwing him, bound and wearing horns, into his own private bullring. When Bond is moments away from being gored to death by three attacking bulls, Schmeck gunmen in black hoods rescue him — assisted by Vesper. He is flown to Schmeck’s base, which is hidden within a dormant volcano. Vesper realises she has been double-crossed by Schmeck when she sees her father’s brain stored with the others. Mengele prepares to remove Bond and Vesper’s brains, but allows Bond to smoke a cigarette. Vesper gives him the lighter, now with the paired trigger attached: “At once Bond sets off the blue light fuse of the atom bomb.” Bond and Vesper escape from the base, chased by Mengele, who tries to kill them with a gun that shoots electricity bolts. This electrifies the ocean surface, scorching Bond, but reactivates the volcano. The base explodes, and a tide of lava swallows the screaming Mengele while Bond and Vesper “sink down in the choppy sea”. The final scene has them checking into a hotel as man and wife, and Bond ignoring a radio message from M on his walkie-talkie as he takes Vesper in his arms.

Hollow Volcanoes and Cigarette Detonators

It’s unclear how much of this was dreamt up by Heller and Mandel, and how much is a summary of others’ work — there are dozens of boxes of material, with many pages out of order or misplaced. The biggest surprise is the climactic sequence. It is strikingly similar to that of You Only Live Twice, but also to the ending of the James Coburn-starring Bond spoof Our Man Flint, which premiered in December 1965. In all three, the villain’s base is hidden inside an island’s dormant volcano, from which the hero escapes, leaving the base to explode and the volcano to erupt. In Heller’s outline, Bond escapes from the base by using an atomic bomb triggered by a cigarette lighter. Derek Flint intends to use a gadget lighter to do the same, but it’s disabled by the villains and he escapes using other means. In You Only Live Twice Bond escapes by causing a distraction with a miniature rocket fired from a cigarette.

There are several precedents for hidden bases in the genre: Sax Rohmer’s 1941 novel The Island of Fu Manchu has the oriental doctor operating a submarine base from the crater of a dormant volcano in Haiti. Cigarette-based gadgets were also common, and had been used by Fleming in From Russia with Love. Still, the number of precise similarities between these ending sequences, all released in cinemas within a couple of years of each other, suggests there could have been a previous source for all three, or some cross-pollination between the productions — especially as Heller’s outline was written before the other two were released. It’s tempting to imagine that Feldman’s paranoia over script leaks was deserved, Catch-22 style, with the writers working on these rival productions secretly meeting up in a bar somewhere to share the latest crazy ideas they were working on. At any rate, Feldman didn’t sue over the ending to You Only Live Twice, despite raising the idea of litigation against Eon more generally in an interview in 1966, claiming that their previous films had lifted “gimmicks” from the novel Casino Royale: “We could sue if we wanted to.”

The gold-plated typewriter on which Ian Fleming wrote his first James Bond novel, Casino Royale.

Heller’s involvement on the film seems to have ended in March 1965. His article about the experience concludes with him becoming so enraged by Feldman’s admission that several other writers are simultaneously working on the same material that he sarcastically proposes to Feldman that he does away with scripts entirely, hires multiple directors and makes everyone in the cast James Bond. Heller was having fun at Feldman’s expense, as this was essentially what happened to the resulting film. The article ends with him telling Feldman to keep the money, and his name out of the credits.

It didn’t stop Feldman’s obsession. He continued with the project, hiring more writers, as well as actors and directors: David Niven, Peter Sellers, Orson Welles, John Huston … on it went. By May 1966, the budget had ballooned to $12 million, with at least $500,000 of it Feldman’s own money. Some of the filming took place at Pinewood, and Feldman even met with Broccoli and Saltzman to discuss going into partnership on the film. However, they couldn’t agree terms: the Eon producers apparently offered him $500,000 and 25 per cent of the profits, but Feldman demanded he retain 75 per cent.

Heller sarcastically proposes to Charles K Feldman that he does away with scripts entirely, hires multiple directors and makes everyone in the cast James Bond.

Feldman realised his biggest challenge in taking on Eon was the main part. To the public, Sean Connery was James Bond, and any other actor in the role risked making the film look like a poor man’s imitation. Even thin material would be accepted with Connery at the heart of it; without him, every weakness would be laid bare. Feldman tried to persuade Connery to defect — although filming You Only Live Twice, the actor was no longer speaking to Broccoli or Saltzman, convinced they had cheated him out of a fortune by refusing to make him a partner. Connery asked Feldman for a million dollars to play Bond. “He hung up,” Connery told the journalist Leonard Lyons. “Now he blames me, saying I cost him millions.”

Casino Royale was finally released in April 1967, two months before You Only Live Twice. It was perhaps the greatest squandering of talent in cinematic history, a tonally erratic spoof jumbling hundreds of half-formed ideas. Bond is played by David Niven as a stuttering priggish English gent, with variations of him played by a nebbish Peter Sellers, an even more nebbish Woody Allen, and so on.

Feldman had commissioned so many competing drafts of the script that it had become an incoherent compilation. Some of Heller’s ideas were used, but transformed almost beyond recognition. A scene at a grouse hunt on a Scottish moor in which a replica bird attacks Bond using a homing device was inflated until a flock of such birds, controlled by a dozen beautiful young women disguised as beaters, attack David Niven’s Bond, who ends the scene tripping over himself with his trousers around his ankles: a tense action scene had become psychedelic farce.

There was also no volcanic lair. It’s unclear if the idea was dropped because of cost, because Feldman didn’t like it, or because he got word that Eon was planning something similar. One wonders what the public’s reaction would have been had Heller’s sequence been filmed, and what that would have done for You Only Live Twice’s release a couple of months later. Then again, few noted the similarities between that and Our Man Flint, so perhaps little would have changed.

Casino Royale made money, but did not dent Eon’s success. The company finally obtained the rights to the Fleming novel in 2004, and set about adapting it from scratch as Daniel Craig’s first film. Feldman’s experiment, long seen as the black sheep of cinematic Bond, was reduced to little more than a footnote in the tidal wave of interest in the new version.

Joseph Heller put the experience behind him, and his article about working on the film is a miniature classic that is well worth exploring. As Eon now own the rights to Casino Royale, they can use any of his material should they wish. Unlikely, perhaps, but audiences were surprised in 2015 to see Kingsley Amis’s name in the credits to Spectre, the result of the scriptwriters using dialogue and ideas from his 1968 Bond novel Colonel Sun.

Charles Feldman died in 1968, Casino Royale his last completed project. It wasn’t quite the success he had craved, but the film seen in cinemas was just the tip of an iceberg, the result of seven years in development. Too many cooks finally spoiled the broth, but if we go back and examine some of the individuals’ contributions there is plenty to satisfy the palate.

For cinema and literary scholars, the Casino Royale material is a lesson in the madness of the creative process under huge pressure, and offers insights into the methods of several of the 20th century’s best-known writers and their as-yet-unexplored work on an iconic film series. There are 25 boxes of material on the film in Los Angeles, totalling thousands of pages. It could take years for researchers to assess it all, if there is an appetite to do so, and to finally untangle this film’s chaotic history. In time, other secrets might also emerge from these archives.