A court case which saw the Northern Ireland judiciary pitted against Westminster MPs has been shelved with both sides claiming moral victory.
The furore was sparked when Labour MP Peter Hain criticised a judge in his autobiography, prompting Northern Ireland Attorney General John Larkin QC to launch a contempt of court action.
But the move sparked a political outcry in the House of Commons as 150 MPs signed a motion of protest and Prime Minister David Cameron said such disputes should preferably remain outside the courts. Now, a compromise struck by Mr Larkin and a lawyer for Mr Hain at the High Court in Belfast has resulted in the case being set aside.
Mr Hain and his publisher wrote to the Attorney General clarifying the critical comments and promising to add the explanation to a future edition of the book, while Mr Larkin pledged not to initiate fresh proceedings on the same evidence.
"This is a victory for freedom of speech," said Mr Hain in a joint statement with his publisher Biteback. "In September we will be publishing the paperback edition of Outside In without changing in any way the section that gave offence to some in the Northern Ireland judiciary."
Outside the court, Mr Larkin said: "It is a victory for the administration of justice and it is important to point out that had Mr Hain provided the explanation and clarification which he now has... we simply would not have been here."
Mr Hain faced a charge of "scandalising a judge". In his book, the Neath MP criticised Lord Justice Paul Girvan's handling of a judicial review of Mr Hain's decision to appoint police widow Bertha McDougall as an interim victims' commissioner for Northern Ireland when Mr Hain was Secretary of State.
His letter explained: "I simply disagreed with, and was exasperated by, the way he dealt with that particular case ... I have never questioned his (Lord Justice Paul Girvan's) standing and motivation as a judge before that case nor have I done since."
Mr Larkin said that having received the letter, he no longer believed there was a risk to public confidence in the administration of justice. The Attorney General told the court: "If the matter had been qualified or explained in the way it now has and only now has, these proceedings would not have been taken."
Tory MP Sir Peter Bottomley said: "I welcome the decision. My advice to judges is to have a thick skin, an umbrella and a sense of proportion, if not of humour. I believe no law officer will again give approval to a similar case."