Two of the most significant figures in the British legal establishment have made urgent warnings about tough sentencing for riot-related offences as the split in the coalition over the response to last week's violence dramatically widened.

Lord Macdonald, who led the prosecution service in England and Wales for five years, warned that the courts risked being swept up in a "collective loss of proportion", passing jail terms that lack "humanity or justice".

Meanwhile his fellow Liberal Democrat peer Lord Carlile, the barrister who was until this year the government's independent adviser on terrorism strategy, warned against ministerial interference in the judicial process, arguing that "just filling up prisons" would not prevent future problems.

David Cameron, who last week promised severe punishments for rioters, saying he hoped courts would use "exemplary" sentences to deter future riots, praised the sentencing decisions, which have included two jailed for four years each for inciting riots on Facebook – riots that never took place – and one person sent to prison for six months for stealing £3.50 worth of water.

Asked about the Facebook case, the prime minister said: "They decided in that court to send a tough message and I think it's very good that courts are able to do that."

But Carlile suggested the sacrosanct separation of powers between the government and the judiciary was being put at risk by comments from some ministers. He told the Guardian: "I don't think it's helpful for ministers to appear to be giving a steer to judges. The judges in criminal courts are mostly extremely experienced and well capable of making the decisions themselves. Ministers should focus on securing the safety of the public."

Asked if ministers had overstepped the mark, he said: "Some judges may feel that and some ministers may feel that they have had a responsibility to use the language of sentences rather than policy."

Macdonald told the Guardian: "Some of the offences that have been committed are exceptionally serious and they require grave punishment, and the sentencing guidelines cater for this. But we are also seeing exceptional punishment for opportunistic offences that appear, on the face of it, to be less serious. Coupled with the threat to remove benefits and to evict the families of rioters from their homes, we are seeing a response that risks becoming excessive and contrary to the norms of justice.

"I think it's essential that the courts don't become swept up in a collective loss of proportion. There is a difference between a sentence that deters and a sentence that lacks humanity or justice. Nothing could be more destructive to social harmony than criminal sentencing which is ill-judged and unfair."

Other senior Lib Dems also expressed deep concern over the government's so-called security crackdown. The former Lib Dem leader Sir Menzies Campbell described himself as being part of a growing "movement" calling for a more considered response to last week's riots. "With all due deference to the prime minister, politicians should be neither cheering nor booing in the matter of sentencing. It is an important part of our constitutional principles that political influence is not directed at the judicial system," he said.

The Liberal Democrat deputy leader, Simon Hughes, stressed that the courts were independent, adding: "I think the message has to be that, look, if you were involved last week you can expect to be punished toughly and firmly.

"But I hope the courts will show understanding and relative leniency on first-time offenders and make sure that all the sentences don't just put people inside and pull them out again, but engage with the community."

The government is already bracing itself for a wave of appeals in the courts, with justice ministers examining the case law on riot convictions. Appeals will put added pressure on the already stretched court system.

Carlile called for the court of appeal to produce new guidelines for judges and magistrates on sentencing for riot-related offences, predicting that many people convicted would appeal. He said there was particularly concern about the number of people being held on remand – two out of three people charged with riot-related offences compared with an average of one in ten – who could also appeal.

He defended the actions of judges, saying it would be inevitable that sentencing would be tougher in the circumstances of the public disorder that took place last week, but added that "just filling up prisons" would not contribute to maintaining the peace of England's streets.