Desmond Boal, who has died aged 86, was one of Northern Ireland's leading criminal QCs, and the founding chairman, in 1971, of Ian Paisley's Democratic Unionist Party (DUP).
Despite his hardline politics, Boal defended Loyalists and Republicans with equal tenacity. He was, one commentator observed, "many a Republican's automatic choice when confronted by the imminence of British justice".
His clients included the Loyalist gunman Michael Stone, who had attempted to wipe out the IRA leadership at a funeral in Milltown cemetery. But he also defended the Irish National Liberation Army gang who had bombed the Droppin' Well disco bar, killing 11 off-duty soldiers, five women and a teenage boy.
Boal was instrumental in ending the use of "supergrasses" in terrorism cases. In 1984, defending 39 Republicans charged on "supergrass" evidence, his submissions to the judge-only "Diplock court" brought about the collapse of what was then Britain's biggest terrorist trial.
He was at his most eloquent in 1992, defending Brian Nelson, an ex-soldier who had been a double agent for the British Army and the Ulster Defence Association. Nelson, charged with conspiring to murder five Republicans, had provided the names of 217 people targeted by Loyalist death squads. Boal told the court: "He helped save the lives of people who, ironically, are now screaming about his activities. He was under no illusions he would get a bullet in the back of the head. He continued for three years living with the threat of death ever present, every minute of the day and night."
Rated by one colleague as "quite mad, but the most brilliant man in the province", Boal was regarded as the political brains behind Paisley. But he could also turn on the invective, in one Stormont debate making the bombastic Paisley "sound like a quiet nun".
Boal's politics had a strong left-wing tinge. This did not endear him to the Unionist establishment, but made him a good fit for Belfast's working-class Shankill constituency which he represented at Stormont from 1960 until the imposition of direct rule from Westminster.
In this time, he brought about the removal of three Northern Ireland prime ministers: Lord Brookeborough; Captain Terence O'Neill, who according to one commentator Boal considered "insufficiently bigoted"; and James Chichester-Clark. He finally left the Unionist party in protest at the policies of Brian Faulkner.
Convinced the British Army could never defeat the IRA because it did not understand it, Boal opposed the internment of terrorist suspects from the outset. He showed his contempt for the tribunals set up to determine whether internees could safely be released by turning up in a sweater and wellingtons.
The teetotal Boal was more outward-looking than most Loyalists. He went to university in Dublin, regularly attended race meetings in the Republic, spent one summer in a Buddhist monastery in Thailand, and another travelling illegally through China during the Cultural Revolution.
While some Loyalists contemplated an independent Ulster as Westminster pressed for power-sharing, Boal in 1974 proposed a "Federal Ireland" - provided the Republic scrapped its claim to the North and offered British levels of social security. Three years later he held "peace talks" with Sean McBride, a former Irish foreign minister with strong Republican contacts.
Boal's readiness to contemplate a solution that sidelined Westminster - though on Loyalist terms - was aimed at preserving Protestant control, not diluting it. His last political act, in 2007, was to call on Paisley and reproach him for having agreed to share power with Sinn Fein. Their friendship never recovered.
Desmond Norman Orr Boal was born in Derry on August 2, 1928, the third of five children of James Boal, a bakery cashier, and the former Kathleen Walker. Desmond excelled at Foyle College, Derry, and Portora Royal School, Enniskillen, before reading Law at Trinity College Dublin. He then qualified for the Bar, eventually taking silk in 1973.
In 1959 Boal first defended Paisley, who had shouted down the Methodist minister Donald Soper in Ballymena. Soper had admitted he did not believe in the Virgin Birth; Paisley threw a Bible at him, and Boal got him off with a £5 fine.
In February 1960 Boal was returned for Shankill in a by-election.
Brookeborough's 20-year premiership ended abruptly in March 1963 after Boal launched a personal attack on him for complacency over Ulster's economic problems. But he was as critical of O'Neill as he sought to improve relations with the province's Catholics and with Dublin.
In February 1969, Boal and 11 Unionist colleagues demanded a change in the leadership. This triggered an election in which the moderates lost ground, O'Neill narrowly surviving a challenge from Paisley - whom Boal was representing on unlawful assembly charges.
Within weeks O'Neill resigned, and Chichester-Clark became premier after defeating Faulkner by one vote. Boal, who had backed Faulkner, seconded the motion confirming Chichester-Clark as leader. That summer rioting erupted in Belfast and Derry and the British army was sent in. Boal demanded an inquiry into troops' use of CS gas against a Protestant mob who had tried to break through into the Catholic Falls; a wider inquiry into the riots was held, under Lord Scarman.
In March 1970 Boal had the whip withdrawn for a second time after abstaining in a vote of confidence in Chichester-Clark. When Paisley took his seat at Stormont the next month, Boal sponsored him, and in September 1971 he resigned from the Unionist Party, telling Faulkner (now prime minister) he was "adding a new dimension to the dishonesty of politics" by meeting British and Irish ministers at Chequers.
On October 1, 1971, the DUP was launched, with Paisley as its leader and Boal as its chairman. Its immediate aim was to make sure any deal on the province's future left Stormont intact, and hardline Protestant opinion well represented. When direct rule was imposed in March 1972, Boal resigned from Stormont rather than take part in its dissolution.
Boal remained at Paisley's side during the election of a Labour government in February 1974, and the subsequent Loyalist general strike which brought down power-sharing. But from the late 1970s he concentrated on the Bar.
One of his most satisfying courtroom triumphs came in 1995, when Boal secured the acquittal of a heavily overworked junior hospital doctor charged with manslaughter after administering a fatal dose of penicillin.
"The system was so woeful that it was just screaming for a mistake to be made," he said. "Unfortunately, the person to make that mistake was a girl just out of medical school."
Desmond Boal, who died on April 23, is survived by his wife Annette.