The ruling appeared to avert a confrontation between the Government and Sinn Fein which had reacted angrily to the move and could have resulted in the extension of Magee's sentence by a year or more.
Mr Justice Girvan said there was no question that the Northern Ireland Sentence Review Commission had acted in bad faith by sanctioning the release of the four men under the terms of the Good Friday Agreement.
The judge said the wisdom or fairness of the 1998 Northern Ireland Sentencing Act, which set up the early release scheme, was not a matter for the court. "History will be the ultimate judge," he added.
He found that the Sentence Review Commission's decision was "totally reasoned and carefully formulated". "Whether one agrees with the final decision or not is irrelevant in this case," he said. "It has not been demonstrated that they misunderstood their function."
Magee, was due to be released in June but three others - Paul Kavanagh, Thomas Quigley and Gerard McDonnell - were due to have been released yesterday. Quigley, Kavanagh and McDonnell are being held in the top security Maze prison, but it was not immediately clear if they would now qualify for immediate release.
Angela Ritchie, the solicitor for the four republicans, said that the governor of the Maze was now awaiting confirmation from the authorities before setting three of them free. Hopefully they will be released as soon as possible. There should be no legal impediment to that happening now," she said.
Bernard McCluskey, representing the Home Secretary, Jack Straw, is considering whether or not the Government should appeal against the decision.
For the Tories, Lord Tebbit - who, with with his wife, was seriously injured in the Brighton bombing - claimed the Government's decision to refer the matter to the courts showed that its policy was in disarray. He said it was "total incompetence that after all this time since we enacted the legislation to let all these criminals out of prison, that the Home Office should suddenly discover and apparently not even tell the Northern Ireland Office that they thought there was a flaw in it so far as the release of criminals convicted on the mainland were concerned".
The High Court ruling came after a day of political impasse in which a further meeting between David Trimble and Gerry Adams in Belfast failed to make progress. The Ulster Unionist leader said all he had heard from the Sinn Fein president was "simple reiteration" of the republican position that decommissioning would not be forthcoming.
In Castlewellan, Co Down, a Catholic man was injured when a grenade exploded at a scrapyard. Responsibility for the attack was claimed by the loyalist Orange Volunteers.Reuse content