Jailing those involved in the riots for longer than they deserve risks undermining confidence in the justice system, lawyers and campaigners said today.

The warning that the rush to send out a tough message and to make an example of those involved in violence was leading to "some very bad sentences" came as members of the coalition Government appeared split over the issue.

Prime Minister David Cameron defended a court's decision to jail two men who tried to incite riots on Facebook for four years, even though the riots they tried to plan never happened, but senior Liberal Democrats urged caution.

Human rights lawyers and criminal barristers also warned against a "knee-jerk response" by the courts over the violence and looting following "the public's anger and the politicians' rhetoric".

But Mr Cameron said: "What happened on our streets was absolutely appalling behaviour and to send a very clear message that it's wrong and won't be tolerated is what the criminal justice system should be doing.

"They decided in that court to send a tough sentence, send a tough message and I think it's very good that courts are able to do that."

Liberal Democrat deputy leader Simon Hughes admitted there were "two strands of political opinion" in the coalition and so there were bound to be "different voices" on what response there should be to the riots.

"The people who have criminal offences can expect no mercy," he told Sky News.

"But I hope the courts will look more sympathetically on a youngster who has never had a criminal offence and may have been swept up into the system."

Former Lib Dem leader Sir Menzies Campbell also took a swipe at Tories who have been demanding tough prison sentences for rioters.

"With all due deference to the Prime Minister, politicians should not be either cheering nor booing in the matter of sentencing," he said.

"It is an important part of our constitutional principles that political influence is not directed at the judicial system."

Leading criminal barrister John Cooper QC warned that judges and magistrates had a duty "not to be influenced by angry Britain", describing some of the sentences handed down already as "disproportionate and somewhat hysterical".

"What's happening here is they're being unduly increased to appease public anger and, as far as the magistrates are concerned, potentially influenced by the views of politicians."

He added that the divergence from normal sentencing procedures was reflected in Ministry of Justice figures which showed two in three people charged over the riots and looting have been remanded in custody, compared with a remand rate of just one in 10 last year for those charged with serious offences.

Sally Ireland, director of criminal justice policy at the Justice campaign group, also said several cases appeared "very much outside the normal range", adding that giving rioters disproportionate sentences to make an example out of them could "compromise confidence in the justice system".

She pointed to that of 23-year-old college student Nicolas Robinson, of Borough, south east London, who, despite having no criminal record, was jailed for six months on Thursday for stealing a £3.50 case of bottled water from a Lidl supermarket in Brixton, south London, during a night of rioting.

Andrew Neilson, director of campaigns for the Howard League for Penal Reform, added that the rush to send a message out was leading to "some very bad sentences, which will be overturned on appeal".

And Emily Butselaar, of the Index on Censorship campaign group, said disproportionate sentences and the Government's rhetoric on banning social media during unrest were "undermining our international reputation as a bastion of free expression and justice".

Max Hill QC, vice-chairman of the Criminal Bar Association, added that higher courts would uphold harsh sentences if they were justified, but in others there would be a "thorough review".

The Sentencing Council, which aims to promote greater consistency in sentencing in England and Wales, denied reports that its senior judges were "split" over the tough sentences.

"The council has not met since the riots and there has been no discussion regarding the appropriate sentencing of rioters," a spokesman said, adding that the Government has not asked it to amend its guidance to deal with future unrest.

The Crown Prosecution Service defended the tough punishments in the Facebook case, saying the web pages caused "significant panic and revulsion" to the people of Cheshire, while Cheshire Assistant Chief Constable Phil Thompson said they sent "a very clear signal in terms of the deterrent effect".

Jordan Blackshaw, 20, and Perry Sutcliffe-Keenan, 22, appeared at Chester Crown Court yesterday after police discovered Facebook pages created by the men which urged rioting in their home towns.

Blackshaw, of Northwich, Cheshire, set up an event entitled "Smash Down Northwich Town", and Sutcliffe-Keenan, of Warrington, created the page "Let's Have a Riot in Latchford".

Neither Blackshaw nor Sutcliffe-Keenan were accused of rioting or looting themselves, yet the pair were given the lengthiest sentences so far in relation to the nationwide disorder for intentionally encouraging others.