The Government plans to remove the "fundamental right" to free legal advice for people held in police custody – 27 years after it was introduced to stop miscarriages of justice.

Coalition MPs have voted through one of the most controversial sections of the Legal Aid, Sentencing and Punishment of Offenders Bill which would restrict access to legal advice for criminal suspects. Clause 12 paves the way for secondary legislation to introduce means testing for legal advice for those held in a police station. It would also see the director of legal aid, a post which does not yet exist, decide which detainees deserve legal aid in the "interest of justice" without any right to appeal.

It is part of sweeping changes which aim to cut the legal aid bill by a fifth. Legal campaigners argue clause 12 encroaches on civil liberties and will tarnish the reputation of Britain's justice system. The right to free legal advice was enshrined in the 1984 Police and Criminal Evidence Act after a swathe of miscarriages of justice involving the fabrication of confessions and intimidation of suspects by police in the 70s and early 80s.

The introduction of the duty solicitor scheme, funded at a flat rate by legal aid, enhanced the international reputation of our justice system.

MPs, lawyers and civil liberty groups have condemned the cost-cutting plans as an "erosion of justice" and warn that it will deprive society's most disadvantaged people access to a lawyer. Substantial hidden costs could follow as a result of delays for police while means testing occurs, domestic and European legal challenges and more cases being thrown out of court, they warn. Means testing at the police station is "simply unworkable", insists the Law Society.

Max Hill, chair of the Criminal Bar Association, said the Government was meddling with a "fundamental right". "To contemplate some sort of qualitative testing to decide when and if a member of the public should receive legal representation and advice in a police station is deeply alarming."

Andy Slaughter, Shadow Justice Minister, said: "Why the Lib Dems, who claim to be the champions of civil liberties, support this is baffling."

Tom Brake, Lib Dem committee member, last night said he had raised the matter with the Justice Minister, Ken Clarke, and defended his decision to vote through the clause. "We are in the Coalition and raising the matter directly with the minister may be more effective at securing changes in legislation than supporting an opposition amendment."

Opposition MPs are angry that the committee has been given seven days, or 40 hours, to scrutinise the 187-page Bill which includes significant constitutional changes. There was no public consultation about Clause 12 and secondary legislation requires only minimal parliamentary scrutiny, warns Rachel Robinson, policy officer for Liberty, who warns this was one of several proposed legal aid reforms which would "devastate access to justice for great swathes of the population". A Ministry of Justice spokesperson said: "The provision in the Bill to permit means testing ensures future flexibility over the operation of the legal aid system should it be needed. There are no plans to make any changes at this time".

Miscarriages of justice

* An official inquiry into a swath of miscarriages of justice in the 1970s and 1980s paved the way for the legal right to a lawyer for detainees in police custody in 1984.