When John Donaldson became a judge in 1966, he did so at at the strikingly young age of 46. Further promotion was predestined. Certainly, his first five decades were highly successful. Yet the 1970s were to do little to enhance his reputation and reverberations from that decade continued into the 1990s. In the last quarter of a century perceptions of Lord Donaldson, who has died aged 84, were to change yet again.

Donaldson was first embroiled in legal, political and media controversy as the one and only president of the National Industrial Relations Court (NIRC) from 1971 to 1974. The NIRC was created by Edward Heath's Conservative government and the preceding Industrial Relations Act was drafted by the then Solicitor-General, Sir Geoffrey Howe.

At the NIRC Donaldson decided repeatedly against trade unions, culminating in a stand-off with the engineering workers union, ordering sequestration of £75,000 of funds for contempt of court. Some 181 Labour MPs signed a commons motion for his dismissal.

This NIRC sequence of high-profile disputes gave credence to the popular, though shallow, view of judges instinctively succumbing to their rightwing backgrounds. Yet it is reasonable to argue that Donaldson decided against trade unions because that is what the legislation demanded. The Industrial Relations Act was passed, after all, into law by parliament.

In 1974 Labour returned to power and the NIRC was abolished. But controversy continued to surround Donaldson. In 1975 and 1976 he presided over two notorious miscarriages of justice, the trials of the Guildford Four and the Maguire Seven.

Nothing in his career had prepared him for his role as the trial judge in those related cases. In the climate of the times, his running of the trials and his comments, especially in sentencing, were much as the media expected. Judges are needed, however, to withstand the pressures of a feverish atmosphere.

In other circumstances, Donaldson used the phrase "lynch-mob mentality" to describe the approach to Myra Hindley and other prisoners taken by the tabloids and home secretaries. But in the cases of the Four and the Seven the legal system needed to provide a dispassionate look at police, scientific and prosecution practice. In those cases Donaldson was, among other things, reminding those (unjustly) convicted that several of them would have been executed in earlier times.

The 1990 inquiry by Sir John May did not blame Donaldson for the Guildford Four miscarriage of justice. Indeed, it could be argued that he came close to spotting some of the errors of the police and prosecution. Patrick Victory, in his book Justice And Truth, pointed out that when Sir Michael Havers, who led for the prosecution, said that the defendant Gerard Conlon had no alibi, Donaldson reminded him that Conlon "claimed he did have an alibi but had been unable to produce witnesses to support it". We now know that the police and the prosecuting authorities, but not the judge, the defence or the jury, knew that an alibi statement had been given to the police.

But in the Maguire case, May's report concluded that Donaldson, by then eight years into his time as Master of the Rolls, made errors of judgment. He should have been more sceptical of "scientific" evidence and stricter on the admissibility of evidence.

In the second half of the 1970s, Donaldson had been passed over for promotion in a rare example of a government allowing political partisanship to thwart judicial preferment. The trade unions and the 1974-79 Labour administrations of Harold Wilson and James Callaghan did not forgive him for NIRC.

It was Margaret Thatcher's government which, in 1979 gave him that promotion to the Court of Appeal. He succeeded Lord Denning as Master of the Rolls in 1982 and did the exact opposite of his predecessor in many ways - including resigning earlier than expected a decade later. He may have been all at sea in the criminal law, but he calmed the waters of the Court of Appeal after the waves generated by Denning.

His predecessor enjoyed being the centre of attention, front of house. Donaldson sorted out the behind-the-scenes mess, cleared the backlog of cases, streamlined procedures and effectively encouraged all and sundry to get a move on, so that justice was not delayed.

He worked hard and he gave Conservative home secretaries just as much of a tough time as those on the left thought they had received. In 1988 he refused to grant a permanent injunction to prevent three newspapers from publishing extracts from Peter Wright's Spycatcher MI5 memoirs.

Then in 1991, an asylum seeker, whose deafness was attributed to brutality by guards who had detained him in what was then Zaire, fled to Britain. He was deported by the Home Office despite an undertaking to the contrary given to a judge hearing a case at short notice.

The then home secretary, Kenneth Baker, albeit advised by lawyers, then refused to obey a court order for his return to England. Donaldson held Baker in contempt of court.

In the Court of Appeal, he was fearless and fearsome, scrapping with counsel who belaboured points he had already seen through or accepted. In one case on abortion, which I observed, he more or less packed counsel off to Westminster to seek - unsuccessfully - leave to appeal his decision. His commercial experience stood him in good stead in two shrewd judgments about the takeover panel, which indicates the 1980s deal-making spirit just as industrial turbulence was a sign of the 1970s.

An instructive insight into his thinking - and an enduring impression of Donaldson - was provided in his performance in the case about broadcasting restrictions on those who - to use current rhetoric - glorified or justified terrorism in Northern Ireland in the late 1980s. In the course of argument, Donaldson described the restrictions introduced by the Thatcher government as "half-baked", which encouraged some to imagine that he was going to decide against the government.

Despite this, he upheld the government's order. But he also indicated that it would take little ingenuity to get round such ill-conceived rules and noted that broadcasters conceded that it affected only a minuscule percentage of their coverage. Donaldson was a judge who became impatient with those who clogged up the courts when they could apply their own ingenuity to secure their aims.

Donaldson was the son of a consultant gynaecologist, and educated at Charterhouse and Trinity College, Cambridge. There he featured strongly in the union debating society and in Conservative student politics and graduated with a lower second in law. In 1941 he was commissioned into the Royal Signals and served with the Guards Armoured Divisional Signals before and after the 1944 Normandy landings, rising to the rank of lieutenant-colonel and serving with the military government of Schleswig-Holstein from 1945 to 1946.

Postwar he was called to the bar at the Middle Temple in 1946 and developed a practice focused on maritime law. Donaldson also dabbled in politics and from 1949-53 was an independent - but effectively Conservative - Croydon councillor. He took silk in 1961.

Looking back on his life, in the knowledge of his love of sailing, maritime law seems an ideal specialism. But it is also a reminder that much legal practice is unconnected to politics, generates no publicity and consists of stupendously dull but fiendishly complex disputes with huge sums at stake. His own inquiries in the 1990s on maritime issues attracted almost no media interest but were models of their kind, producing recommendations genuinely in the public interest.

In retirement, he was still making news in his 80s, apparently relishing the opportunities, given far too often by governments, for judges to outflank them on the liberal side. He was highly critical of Michael Howard, when as the last Conservative home secretary, he was trying to curb judges' discretion in sentencing, and was attacking them. Donaldson returned with gusto to this theme very recently - and quite rightly - in criticising the current government's response to terrorism in London this summer.

His equally energetic wife was also committed to public life in her own right - she was the first woman Lord Mayor of London - and to sailing. They married in 1945, she died in 2003. They are survived by two daughters and a son.

· Lord Donaldson of Lymington, Master of the Rolls, born October 6 1920; died August 31 2005