Was the Scottish officer in charge when the Titanic hit an iceberg a murdering, incompetent coward who shot himself or a brave man doing his duty? Or was he a brave man who went down with his ship, saving the lives of others?

You can imagine the scene. James Cameron and his scriptwriters are discussing the plot of his next project, a reshoot of one of America’s favourite subjects: the sinking of the Titanic.

The story has all the elements for a great movie: drama (a 46,000 ton ship crashing into an iceberg); death aplenty (1,500 people either trapped in the ship or dying of hypothermia); glamour (a luxury liner filled with glitzy people); and romance (there were honeymooners, mistresses, and that old married couple who went down together).

But there’s one thing missing. Guns! What about guns? We need a shooting! Well… There were some accounts in the press of an officer shooting two men and then shooting himself. How many accounts? A few.

What about the 86 witnesses at the US Senate Inquiry and the 95 witnesses at the UK Board of Trade Inquiry, who gave evidence on oath? Did any of them mention a suicide? No. Doesn’t matter, as long as someone said it, we’ll put it in. Now, who did you say shot himself?

This account might seem facetious, but it’s probably not that far off the truth. Because it was surely Hollywood’s love affair with guns that led Cameron to ignore the overwhelming majority of eyewitnesses who do not mention someone shooting themselves, even though they were in the right place at the right time, and to focus instead on a small minority who claim someone did.

Unfortunately, none of the witnesses could agree who the officer in question was, suggesting variously it might be Chief Officer Wilde, First Officer Murdoch, or even Captain Smith himself. No matter. Cameron would decide for them. And Murdoch it was, for no obvious reason except that it must be one of the missing officers from the starboard side of the ship. And dead man don’t complain or sue.

Cameron’s movie, at least the eighth to tell the story of the Titanic, was a massive success, becoming the highest-grossing movie of all time.

For many of the millions of people who saw the movie, Cameron’s is the only version of the story they know. And so, for the sake of filling Hollywood’s coffers, the final minutes of one of Scotland’s bravest men have been transformed into a ghastly soap opera. The world now remembers Murdoch as the cowardly man who shot two passengers and then turned his gun on himself. And who cares if the story is true when it makes such great cinema?

William McMaster Murdoch was born in Dalbeattie, Dumfries and Galloway, in 1873 to a seafaring family. Both his father and his grandfather were sea captains, and several of his uncles were sailors too. William continued the family tradition by going to sea aged 13 and serving aboard various sailing ships during the final years of the ‘age of sail’, travelling as far afield as Chile and China.

He joined the White Star Line in 1900, rising from Second Officer to First Officer, and serving on board a variety of ships, including three of the so-called ‘big four’: Celtic, Cedric and Adriatic. He earned a reputation for having a cool head in a crisis while serving on the White Star Line’s Arabic in 1903, when he narrowly avoided a collision by seizing the helm and steering the ship to safety. Murdoch had a less salubrious career on board the White Star Line’s next megaship, the Olympic, which he joined in May 1911.

Under the command of Captain Smith, the ship first collided with a naval vessel on the Solent, causing extensive damage to both ships, then hit a wreck off New York, requiring her to be fi tted with a new propeller, and then nearly ran aground off Belfast. It was a hint of much worse things to come.

The story of the Titanic is well known. Built as the biggest and most luxurious liner the world had ever seen, she was intended to outshine the new ships launched by the White Star Line’s main rival, Cunard.

Her waterproof bulkheads were thought to make her unsinkable, and she was therefore only fitted with lifeboats for 1,176 people – half her complement of 2,223 passengers and crew.

Murdoch was 39 years old when the Titanic was commissioned in 1912, with 16 years of service behind him. He was a logical choice for Chief Offi cer, with his old friend Charles Lightoller as First Officer. He must have been disappointed, therefore, when Captain Smith brought along his second-in-command from Olympic, Henry Wilde, as Chief Officer, and Murdoch was demoted to First Officer, with a corresponding reshuffle in the lower ranks.

Murdoch was the offi cer in charge when the Titanic struck an iceberg. There are varying accounts of his actions, but most agree that he did everything possible to avoid collision.

Once the order was given to abandon ship, Murdoch took charge of the starboard deck and was responsible for filling eight lifeboats, saving 330 lives.

According to Lightoller, he remained on deck right until the last lifeboat was floated off by a wave. Lightoller told the British inquiry: ‘Mr Murdoch I saw at the actual moment that I went under water. He was then working at the forward fall on the starboard side forward; that is the fall to connect to the collapsible boat.’

As the last lifeboats were launched, however, several witnesses report hearing gunshots, and some claim to have seen an offi cer shoot two men who were trying to rush the boats and then shoot himself – although none of the firsthand accounts mention Murdoch by name.

Shots were fired to control the crowd, but most witnesses say these were fired into the water or over people’s head. It’s easy to see how, in the confusion, this might be misconstrued as shooting at people. Witness accounts are notoriously unreliable, and there is nothing in Murdoch’s previous history to suggest he would either shoot at people or shoot himself.

He had a cool head and, with his beloved wife Ada waiting for him at home, everything to live for. Certainly Lord Mersey, who oversaw the British Inquiry, thought so. ‘The evidence satisfies me that the officers did their work very well and without any thought of themselves,’ he said. ‘Captain Smith, the Master, Mr Wilde the chief officer, Mr Murdoch, the first officer, and Mr Moody, the sixth officer, all went down with the ship while performing their duties.’

The story was too sensational to be ignored by the papers, however, and it was used to feed the public desire for a scapegoat. Eighty five years later, the story proved irresistible to Cameron too, and he used it to add an extra twist to his story.

Needless to say, the people of Dalbeattie were outraged when the movie was released, and Cameron was eventually forced to issue an apology in the form of a £5,000 donation to the Murdoch Memorial Prize Fund.

Only time will tell whether Murdoch’s reputation will recover, but it is worth remembering the words of the man he knew best on the Titanic.

‘I was practically the last man, and certainly the last officer, to see Mr Murdoch,’ Lightoller told his widow. ‘He was endeavouring to launch the starboard forward collapsible boat. Other reports as to the ending are absolutely false. Mr Murdoch died like a man, doing his duty.’

Nic Compton is the author of Titanic on Trial: The Night the Titanic Sank, published by Bloomsbury.