A handsome crusader beats the right-wing establishment to save a black man from the gallows. The unlikely liberal hero? Young Rupert Murdoch. Now the media baron's past as a rebel with a cause is to be retold in a film starring Robert Carlyle and Charles Dance.

The 27-year-old Murdoch was publisher of The News in Adelaide when an Aboriginal fairground attendant, Rupert Max Stuart, was sentenced to hang for the rape and murder of a nine-year-old white girl, Mary Hattam, near the south Australian town of Ceduna in 1958. The flimsy case against the illiterate and often drunk Stuart rested on a confession written in well-educated English, which is now believed to have been fabricated by the police.

Murdoch, who had had a reputation for being left-wing at Oxford University before he inherited The News from his father, threw his weight behind Stuart's lawyer, David O'Sullivan, challenging the Adelaide establishment at a time when the country's 'white Australia' policy still failed to respect Aborigines.

The future mogul funded a trip to London by Stuart's lawyers, who tried without success to persuade the Privy Council to hear an appeal. Murdoch supported the campaign of his feisty editor, Rohan Rivett, who used The News to raise public doubts about Stuart's guilt, notably by unearthing evidence that he was elsewhere when the killing occurred.

Years later, Murdoch said: 'There's no doubt that Stuart didn't get a totally fair trial. Although it's probable that he was guilty, I thought this at the time. In those days - although less so now - I was very much against the death penalty.'

Stuart's conviction was upheld at two appeals, but his execution was postponed six times and the newspaper helped force the establishment of a royal commission which commuted the death sentence to life imprisonment. Stuart was released on parole in 1973 and, after five breaches, was finally freed in July 1984. He became an honoured elder of the Aborigines in outback Australia and greeted the Queen during her visit to the country three years ago, telling a reporter: 'I thought she'd talk in big language, but she's really like one of us, like a bush woman.'

The landmark case, which ultimately led to the abolition of capital punishment in Australia, has been turned into a film, Black And White, released in Britain on Friday. Audiences will be treated to Murdoch's Twelve Angry Men-style victory against the odds, but there is a less edifying postscript that did not make it to the big screen. In July 1960, just weeks after Murdoch and Rivett were cleared of seditious libel and defamation against the Chief Justice, the young proprietor sacked his editor from the paper on which he was to build his multi-billion-pound global media empire.

Quoted by his biographer, William Shawcross, Murdoch explained: 'We'd won the Stuart case, so I wanted to cool it for a while. It had divided the community terribly. Rohan agreed with me absolutely. Then a couple of weeks later he had a front page [on the case] denouncing [the government] more angrily than before.

'It became quite clear that what would be a reasonable partnership if I was there was not going to work in my absence. So I decided it was time we parted company. Some people wondered why I hadn't done it before. But I liked Rohan. He was strange and egocentric, but a good, well-intentioned man.'

This episode does not feature in the Australian-British co-production which stars Carlyle as O'Sullivan and Australian actor Ben Mendelsohn as Murdoch.

Carlyle, who has clashed with tabloid papers in the past over stories about his private life, said of Murdoch: 'He's this guy who, certainly in Britain, is seen as a particular type of tabloid man. And you think, well, this is where the guy started, he started on the side of justice originally.' Carlyle added, however: 'Originally was a long while ago.'

But Charles Dance, who plays prosecutor Roderic Chamberlain, said: 'Rupert Murdoch jumped on the bandwagon. He realised there was a powerful movement for the abolition of the death penalty across the rest of the country and saw an opportunity to flog a few newspapers. He is a businessman first and foremost.'

Kerry Fox, who plays O'Sullivan's partner, Helen Devaney, added: 'It was probably the last good thing he did. You can see that it was a plan to sell papers and I don't think he did it for justice. He's fairly ruthless.'

When the film was released in Australia, one judge remarked: 'I regard it as a sobering discovery to learn from Black And White that the real saviour of Stuart's life was not the Australian court system. It was the chance decision of a young media personality.'

Murdoch's most recent biographer, Bruce Page, said the case was pivotal in his career. 'It was the very brief period of Rupert's radicalism, which was a very good thing for Stuart as it got him out of the hangman's noose. Murdoch galloped into action, but it was a bad fight for him. The truth is it scared him off from ever taking on governments again. He reverted to his father's pattern of toeing the line.

'He wasted little time ditching his editor, who was made the sacrificial lamb. Not much of that comes out in the film, which is flattering: he comes out of it rather better than he deserved to.

'No one would object to being portrayed as someone who saved a life heroically. I believe if he had had another four or five years' experience under his belt, he wouldn't have taken it so seriously. Afterwards he decided to stay on the right side of governments, which was good for him but bad for the newspaper business.'

When the movie premiered in Sydney, audience members could be heard sniggering at the rosy portrait of Murdoch. But whatever the young tycoon's motives, he has not forgotten the life he helped to save. A few years ago, when each was past his seventieth birthday, Murdoch is said to have sent a message inquiring after Stuart's health.

And Stuart remains grateful to Murdoch: 'He wanted the truth, you know. I could see him out in the court. I was with the policemen; my lawyer told me it was him.'