Alan King-Hamilton was a judge who made no effort to conceal his highly opinionated personality, and in particular his disapproval of the emergence of the permissive society in the 1960s and 1970s. He was tough on crime but also tough on issues of sex, especially homosexuality. Praising a jury for finding against Gay News in a blasphemy trial, he hoped that "the pendulum of public opinion is beginning to swing back to a more healthy climate". He thought of himself as a robust, no-nonsense judge. One of his favourite mementoes was a truncheon he was given during the 1926 General Strike, when he acted as a temporary Special Constable.
He was repeatedly in the news, presiding as he did in trials involving defendants such as an alluring Kensington madam, a major fraudster, a covey of alleged anarchists and a future cabinet minister. Far from being daunted by high-profile cases, he seemed to relish being in the thick of it, sometimes playing to the gallery with jocular remarks. In at least one case he relayed test cricket scores to his Old Bailey court. He lived to the age of 105, long enough to witness the fact that the pendulum of society had not swung as he had hoped.
The son of a London Jewish solicitor, King-Hamilton was born in Hampstead and educated at Bishop's Stortford grammar school in Hertfordshire and later at Cambridge. Although he was president of both the union and the law society he did not excel academically, taking only a third in law. During the Second World War he interrupted his legal career to function as a press censor before joining the RAF as an intelligence officer, attaining the rank of squadron leader.
As a barrister he lost a client to the gallows in the early 1960s when a 19-year-old, whose friend had just been hanged, shot and killed a bank employee, claiming that he was the reincarnation of "Legs" Diamond.
He rose steadily through the judicial ranks, though he never became a High Court judge. Instead, he sat at Hereford, Gloucester, Wolverhampton and Oxford before moving to the Old Bailey. It was there, in 1977, that he presided over perhaps his best-remembered case, which at the time excited huge interest. The campaigner Mary Whitehouse instigated the prosecution of Gay News over a sexually explicit poem it had published about Christ on the cross. Written by James Kirkup, it was entitled "The love that dares to speak its name". The crown took over the prosecution, designating King-Hamilton as the judge in what was the first blasphemous libel case in more than half a century.
The defendants and their supporters have always complained that King-Hamilton was biased against them; he was certainly a sympathiser with Mrs Whitehouse and her moral crusades. He is said to have declared before the trial that homosexuality had contributed to the fall of the Roman Empire.
One of the Gay News team later recalled: "As I got the feel of the Old Bailey, I sensed that this was going to be the nearest thing to a show trial that the system could muster." King-Hamilton was said to have systematically ingratiated himself with the jury, apologising for having to ask them even to read the poem.
The defendants had the dubious consolation of having the fortunes of the England cricket team related to them by the judge. When the jury found against Gay News, he praised its members, imposing fines and a suspended sentence on the paper's editor. The Court of Appeal and House of Lords upheld the verdicts, although the suspended sentence was quashed.
In later life King-Hamilton said he had been shocked and horrified by the poem, adding: "One didn't have to be a Christian to be revolted by it." He later described his summing-up in the case as "the best, by far, that I have ever given." He explained: "I can say this confidently without blushing because, throughout its preparation, and also when delivering it, I was half-conscious of being guided by some divine inspiration." Perhaps surprisingly, given the source and strength of his inspiration, he later changed his mind and said he regretted handing down the suspended sentence.
He again invoked God, however, in a prosecution of alleged anarchists, when he made no attempt to conceal his view that a jury had been wrong to acquit several defendants. Instead of discharging the jury he ordered them to return to the court to hear him hand down a nine-year sentence to one defendant who had pleaded guilty. He sternly told the jury: "Now you know what you have done, I pray to God that none of you will ever have occasion to regret it."
He also made it plain, in court and in his memoirs, that he did not much care for Peter Hain, then a Young Liberal, later a Labour cabinet minister, when he appeared before him on a robbery charge. Hain, who was acquitted, felt King-Hamilton had shown bias against him. In King-Hamilton's memoirs, And Nothing But the Truth (1982), he robustly declared that comments from the bench were "an inherent right". He was involved in controversy so often that the book was described as an exercise in self-defence.
Another of his cases was against Janie Jones, a brothel-keeper who provided many tabloid headlines in a case replete with hidden two-way mirrors and a Rolls-Royce. Denouncing her as "the most evil woman I've ever met," he gave her seven years in jail for luring women into prostitution and attempting to pervert the course of justice.
In one case he earned himself a reprimand from the Lord Chief Justice, Lord Parker, for describing a defence case as "hopeless". The youth he jailed was later released, Lord Parker describing King-Hamilton's comments as a wholly improper "outburst."
On other occasions he suggested the return of National Service, birching, and forcing miscreants to walk through the streets with a placard detailing their offences. Lenient sentences were almost useless, he said, though later in life he said: "Nobody likes sending someone to prison. I hated it. But it has to be done."
He imposed a particularly stiff sentence, of 23 years, on a defendant who refused to disclose the whereabouts of a large amount of stolen money.
King-Hamilton did not go quietly into retirement, showing some reluctance to leave the limelight. For a time he became something of a legal celebrity by holding court on a Yorkshire Television programme called Case on Camera, where he arbitrated on minor cases.
He also took on the chairmanship of the Pornography and Violence Research Trust which developed out of Mary Whitehouse's activities. He dashed off occasional letters to newspapers until well into his 90s. He defended, for example, his membership of the Masons, telling those who publicised this to "cease this intrusion".
In 1935 he married Rosalind Ellis, who predeceased him in 1991. He is survived by two daughters.
Myer Alan Barry King-Hamilton, judge: born London 9 December 1904; called to the Bar, Middle Temple 1929, Bencher 1961; QC 1954; Recorder 1955-64; Judge of the Central Criminal Court 1964-79; Deputy Circuit Judge 1979-83; married 1935 Rosalind Ellis (died 1991; two daughters); died 23 March 2010.