It is one of the most famous film endings ever made. A coach teeters over an Alpine precipice. Inside, Michael Caine attempts to retrieve $4m of gold bullion that he and his gang have just stolen from a high-security van in Turin, threatening to topple the vehicle over the edge in the process. As the gold slips out of his reach he turns to his gang who are providing the counter-weight and says: "Hang on a minute, lads. I've got a great idea."
As the camera pulls away at the end of The Italian Job, the viewer is left wondering what the idea is and whether or not the gang will get out alive and save the booty.
But it has emerged that Troy Kennedy Martin, the writer of the 1969 film, and Peter Collinson, its director, planned a very different ending. The conclusion that ended up on screen was bolted on by the legendary Paramount studio boss Robert Evans to replace the original ending.
At a National Film Theatre screening of the film this week, Kennedy Martin was asked by a member of the audience what he thought would happen after the credits. He replied: "Well, I didn't think anything because I didn't write that ending. My screenplay had a totally different ending. It was Bob Evans at Paramount who decided the film should end in the mountains. Had I delivered that cliffhanger ending, I imagine I would have been sacked."
For fans of The Italian Job, "what happened next" is a major topic of discussion. Caine has his own theory: the gang get out of the coach safely before trekking to the bottom of the cliff where they retrieve the gold, only to find themselves surrounded by Mafia hitmen with machine guns, who take the bullion back to Turin.
Kennedy Martin, who had envisaged a much darker film, resigned himself to matters being taken out of his hands when the producer cast Noel Coward and Benny Hill. "Once they had managed that and I saw which way the film was going I just let them get on with it," he said.
So what ending did Kennedy Martin originally envisage? "Charlie and the boys escaped from Italy and deposited the bullion in a Swiss account with each one of them privately memorising part of the box number to stop any one of them going back and helping themselves. As they emerge from the bank the Mafia are there and kill two of them, making it impossible for them to ever release the gold. But even then Charlie has an idea. He says, 'We'll just have to go back day after day and add a new number each time until we get it right'."
The writer took the idea for the heist from his brother Ian, the creator of The Sweeney, and moved the action to Italy.
On the back of the success of The Italian Job, Kennedy Martin wrote Kelly's Heroes, starring Clint Eastwood, Telly Savalas and Donald Sutherland as US soldiers trying to steal gold bullion from behind enemy lines.
Follow James on Twitter, @jamesjamesbrown