Image caption Offensive tweets can land you in prison

The number of alleged crimes involving Facebook and Twitter has increased nearly eight-fold in four years, according to police figures.

There were 653 people charged in 2012 out of 4,908 offences reported to 29 forces in England, Scotland and Wales.

Police chiefs said the figures demonstrate a new challenge.

Last week, interim guidelines were issued, aimed at reducing the number of charges in England and Wales, after a string of controversial court cases.

The conviction of Paul Chambers in 2010 for joking on Twitter about blowing up Robin Hood Airport in South Yorkshire was widely condemned and eventually quashed.

The latest statistics were released by the police under the Freedom of Information Act.

The guidance means some people could avoid trial if they are sorry for criminal comments posted while drunk Dominic Casciani, Home affairs correspondent Fewer Twitter prosecutions likely

In 2008, when the level of social network activity was much lower, there were 556 reports of alleged crimes with 46 people charged.

By this year that figure had risen to 4,908 allegations and 653 charged.

Chief Constable Andy Trotter of the Association of Chief Police Officers said it was important that police prioritised social networking crimes which caused genuine harm.

He said: "We need to accept that people have the right to communicate, even to communicate in an obnoxious or disagreeable way, and there is no desire on the part of the police to get involved in that judgment.

"But equally, there are many offences involving social media such as harassment or genuine threats of violence which cause real harm.

"It is that higher end of offending which forces need to concentrate on."

Police forces were asked to provide the number of crime reports in which either Facebook or Twitter was a key factor, and nearly two-thirds responded.

Offences included those committed on the websites, such as the posting of abusive messages, but also violent attacks committed for real but provoked by these kinds of online postings.

As well as menacing and threatening messages, there were also numerous sexual offences including grooming, complaints of stalking, allegations of racially aggravated conduct and reports of fraud.

Image caption Celebrities including Stephen Fry and Al Murray supported Mr Chambers

Greater Manchester Police charged the highest number of people, at 115. Lancashire Police say they received reports of six threats of murder.

Mr Trotter said some of the offences would have been committed anyway, regardless of the existence of social media.

"We have to respect free speech and cannot have police forces responding simply because of public outcry.

"In many ways, online communities can be self-regulating and good at weeding out unacceptable behaviour. We need to find a way of distinguishing between that type of behaviour and that which requires police intervention."

He welcomed recent guidance from the Crown Prosecution Service (CPS), saying it set a "high threshold" for that intervention and represented a first step towards a better co-ordinated approach.

Director of Public Prosecutions Keir Starmer QC has announced new guidelines on how people who post offensive messages on Facebook and Twitter should be dealt with.

He admitted the CPS made the wrong "judgment call" in the case of Mr Chambers.