A contempt of court case taken against Labour MP Peter Hain over criticisms he made of a judge in Northern Ireland will not proceed, the High Court in Belfast has ruled.

Controversial comments in the former Northern Ireland secretary's autobiography, criticising a judge's ruling, sparked the legal action by the region's Attorney General John Larkin QC.

A compromise was struck by Mr Larkin and a lawyer for Mr Hain which resulted in the case being effectively set aside. Mr Larkin promised not to initiate fresh proceedings on the same evidence.

Mr Hain faced a charge of "scandalising a judge" but lawyers for the Labour politician and his publishers Biteback had contested this.

The views written by the Neath MP related to 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.

But the court heard that Mr Hain had written to Mr Larkin clarifying his comments.

His letter explained: "I simply disagreed with, and was exasperated by, the way he dealt with that particular case ... I have never qualified his (Lord Justice Paul Girvan's) standing and motivation as a judge before that case, nor have I done since.

"My words were never intended to, not do I believe that they did, in any way undermine the administration of justice in Northern Ireland or the independence of the Northern Ireland judiciary, that very independence and integrity I worked so hard as Secretary of State to achieve support for from all sections of the community, including those who had previously denied it."

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."

Lawyers for Mr Hain welcomed his comments. The publishers said a footnote would be inserted in a future edition of the book, containing Mr Hain's clarification.