LONDON (AP) — Britain’s Supreme Court on Wednesday quashed Irish nationalist politician Gerry Adams’ convictions for trying to break out of prison in the 1970s, handing a long-awaited legal victory to the former Sinn Fein leader.

The U.K.’s top court said Adams’ two 1975 convictions for trying to escape from the Maze prison in Northern Ireland were invalid because his detention at the time was unlawful.

One of the most influential figures of Northern Ireland’s decades of conflict, Adams led the Irish Republican Army-linked party Sinn Fein between 1983 and 2018. He has always denied being a member of the IRA, though former colleagues have identified him as one of its leaders.

Adams, now 71, was jailed in 1972 under rules that allowed terrorism suspects in Northern Ireland to be detained without charge, but was released a few months later to attended secret peace talks with the British government. He was interned again the following year and twice tried to escape. He was convicted for the attempted escapes and sentenced to four and a half years in prison.

At a hearing held remotely to comply with social distancing rules amid the coronavirus pandemic, five Supreme Court judges ruled that because then-Northern Ireland Secretary Willie Whitelaw had not “considered personally” the order to detain Adams in 1973, it was invalid.

“In consequence, Mr. Adams’ detention was unlawful, hence his convictions of attempting to escape from lawful custody were, likewise, unlawful,” said one of the judges, Brian Kerr. “The appeal is therefore allowed and his convictions are quashed.”

About 2,000 people were detained under Northern Ireland’s highly contentious internment policy, which lasted from 1971 to 1975.

Adams said there was now “an onus on the British government to identify and inform other internees whose internment may also have been unlawful.”