A ban on prisoners who have a history of absconding being moved to open prisons has been ruled unlawful by the high court.

Lord Justice Bean and Mr Justice Mitting struck down the ban, which the justice secretary, Chris Grayling, introduced last May in the wake of widespread media reporting of a case in which an armed robber, Michael Wheatley, known as Skullcracker, went on the run while on day release from jail.

Grayling announced that he was “tearing up the system as it exists at the moment” in the wake of a spate of cases of absconding prisoners similar to that of Wheatley. In one, a convicted murderer, Arnold Pickering, went on the run for a third time.

At the time Grayling vowed: “If people break the rules, if they abscond, if they stick two fingers up at the system, there should be consequences. Those prisoners should be placed back in closed conditions, and those prisoners will be … once they have been recaptured.”

He pledged to close the loophole that allowed prisoners who had absconded while on temporary release from an open prison to remain in open conditions.

The justice secretary rushed in the ban despite protests from prison governors and the Prison Reform Trust, who said the temporary release failure rate was only 0.06%. They argued that the reduction in temporary release failures had been one of the prison system’s successes in recent years.

The high court case was brought on behalf of a prisoner, John Gilbert, who was banned from open prisons after he failed to return to HMP Standford Hill in Kent after temporary day release on a Sunday evening when he missed his last train. He handed himself in at a police station the next morning.

The two judges declared the ban unlawful, saying that Grayling’s hastily introduced policy was at odds with his own official directions to the parole board. These require most inmates serving indeterminate sentences to go through a phased release from closed to open prisons “in order to test their readiness for release into the community”.

The judges said the inconsistency between Grayling’s new absconder policy and his long-standing directions to the parole board was “irrational”.

They also said they were “not impressed” with Grayling’s claim that since the ban and the parole board directions had both been issued by him, he had the power to ignore or contradict them at will. “So long as they remain in force … he cannot lawfully tell the board to ignore them or his officials to frustrate them,” the judges said in their ruling. The justice secretary was given permission to appeal against the ruling.

The Prisoners’ Advice Service, who represented the prisoner who brought the case, said: “The so-called ‘absconder policy’ was introduced as a knee-jerk reaction to negative press reports without adequate consideration for other existing policies or its impact on the prisoners whose progression to open conditions was abruptly prevented.”

A Ministry of Justice spokesperson responded to the ruling saying: “The fundamental principles of the policy are not unlawful. The court found there was inconsistency with the implementation.

“Our position remains that temporary release can be an important part of rehabilitating offenders but not at the cost of public protection. We are appealing this decision.”

• This article was amended on 3 April 2015. An earlier version said that HMP Standford Hill is in Sussex, rather than Kent.

