Gerry Adams has failed in a bid to overturn historical convictions for attempts to escape from prison more than 40 years ago.
Lawyers for the former Sinn Fein leader argued that his internment was unlawful because Northern Ireland’s Secretary of State did not personally authorise it.
But judges in the Court of Appeal ruled that another junior minister had legal power to sign the order for his detention.
Rejecting claims the process was flawed, Sir Ronald Weatherup said: “Accordingly the court is satisfied that the convictions are safe.”
Mr Adams was among hundreds held without trial under a programme introduced by the British Government during the early years of the conflict in Northern Ireland.
First interned at the Long Kesh camp in March 1972, he was released in June that year to take part in secret talks in London.
He was arrested again in July 1973 at a house in Belfast, and detained once more at the site of the Maze prison.
The Louth TD was challenging convictions in 1975 for two alleged bids to escape from lawful custody.
Details of both attempts to flee from the prison were disclosed during the appeal hearing.
On Christmas Eve 1973 he was among four detainees apprehended by wardens while allegedly trying to cut their way through its perimeter fencing.
All four had made their way through the wire, and had been provided with clothing and money in a “well planned” escape bid, when they were caught.
In July 1974 a second attempt to escape involved a switching with a kidnapped visitor who bore a striking resemblance to Mr Adams, the court heard.
That man had been taken from a west Belfast bus stop to a house on the Falls Road where his hair was dyed and other changes made to his appearance.
He was then driven to the prison where an elaborate scheme was launched to substitute him for the future Sinn Fein chief amid scenes of confusion.
But Mr Adams was arrested after being spotted by staff in the car park area.
He was later sentenced to 18 months in jail for attempting to escape.
Mr Adams, who stepped down as Sinn Fein President last weekend, was not present for the verdict on his appeal.
His bid to overturn the convictions was based on Government papers recovered from the National Archives in London.
His legal team argued that the 1972 Detention of Terrorists Order required that the Northern Ireland Secretary must authorise interim custody orders used to intern suspects.
Because it was such a draconian power Parliament had ensured it could only be exercised at such a senior level, they contended.
The court was told a junior minister in the Northern Ireland Office signed the order for Mr Adams internment in July 1973.
Counsel for Mr Adams told the court evidence shows no consideration was given by the Secretary of State.
That level of authority was required to ensure the process was legally valid, it was claimed.
But a barrister representing the Public Prosecution Service (PPS) countered that a long-established legal doctrine enabled other ministerial figures to lawfully authorise Mr Adams’ internment.
He argued that the Carltona principle covered those for whom the Secretary of State has responsibility.
Sir Ronald, who heard the appeal with Lord Chief Justice Sir Declan Morgan and Sir Reg Weir, backed the PPS position.
He said: “We are satisfied that the decision to make the ICO (Interim Custody Order) could have been made by an appropriate person on behalf of the Secretary of State.
“We are satisfied that the Minister was an appropriate person.”
Dismissing the appeal, he added: “This court has been satisfied as to the validity of the ICO made by the Minister on behalf of the Secretary of State.”