Government plans for cutting criminal legal aid by £220 million have been thrown into confusion after the high court ruled that the Ministry of Justice consultation process was so unfair that it was illegal.

The decision is a significant setback for Chris Grayling, the justice secretary, who was in charge of negotiations with the legal profession that led to 17.5% cuts in fees and reductions in the number of duty contracts for solicitors to attend courts and police stations.

Mr Justice Burnett ruled that the process was "so unfair as to amount to illegality". He said the Ministry of Justice (MoJ) refused to allow those engaged in the consultation process on the cuts to comment on reports by the accountants KPMG and Otterburn, which provided the foundation for deciding how many contracts for criminal advisory work would be available to solicitors' firms.

The MoJ said another challenge to cuts in the levels of fees had been unsuccessful. The department will consider the judgment to see whether it is obliged to rerun the consultation process.

The Criminal Law Solicitors' Association (CLSA) and the London Criminal Courts Solicitors' Association, which brought the judicial review challenge, said they would seek a royal commission into funding for access to justice.

Bill Waddington, chairman of the CLSA, had requested the documents before the MoJ decision. Failure to provide them, he had argued, reduced dramatically the number of firms able to apply for duty contracts, without the profession being given any chance to comment upon the assumptions outlined in the reports.

"[This] is a damming indictment of the lord chancellor, Chris Grayling. The head of our world-renowned justice system must act fairly, instead he has attempted to enact a plan that is manifestly unfair. Limiting access to justice and shredding the treasured principle of equality before the law," Waddington said.

"At a time when constitutional change is in the air, the right of citizens to defend themselves against state-funded prosecutions is not something that should be manipulated in a political way, but investigated impartially to appropriate savings and reforms that are sustainable and in the public interest."

Robin Murray, vice-chairman of the CLSA, said: "The way the government has handled this process means we no longer have any faith in their ability to conduct any further consultation with fairness and integrity. It has clearly not acted in the public interest as we would expect it to act; it has manipulated and schemed to the point where the high court labels its conduct as unfair and illegal."

An MoJ spokesperson said: "This judicial review was not wholly successful – the claimants failed in their challenge to the fee cut. However, the judgment has raised some technical issues about the consultation process, which we are carefully considering.

"We will continue to implement reform of the criminal legal aid system. We must ensure legal aid is sustainable for those who need it, for those who provide legal services as part of it and for the taxpayer, who ultimately pays for it. Even after reform, we would still have a very generous system at around £1.5bn a year."

Shadow justice secretary Sadiq Khan said:"We knew David Cameron's

government was incompetent but this latest damning judgement takes the

biscuit."For Chris Grayling to press ahead with legal aid changes in light

of this mauling in the high court would be arrogant even by his standards

and risks wasting even more taxpayers' money. His proposals would see two classes of justice with one for those who can afford proper representation and one for those without their own financial means. This would destroy any semblance of everyone being equal in the face of the law"

• This article was amended on 19 September 2014. An earlier version wrongly stated that cuts to legal aid had been ruled illegal rather than the consultation process.