The director of public prosecutions Keir Starmer has said swiftly deleting abusive tweets may save offenders from being brought before court.

Starmer, who is the country's leading prosecutor, said it was "relevant" for police to consider whether an offending tweet had been deleted or not.

Speaking on Sky's Dermot Murnaghan programme, he said he was holding a three-month consultation about the plan.

Download the new Independent Premium app Sharing the full story, not just the headlines

Libellous tweets, or messages which broke court orders or were threatening, would still face prosecution regardless, he added.

Mr Starmer said: "There's a lot of stuff out there that is highly offensive that is put out on a spontaneous basis that is quite often taken down pretty quickly and the view is that those sort of remarks don't necessarily need to be prosecuted."

He added: "I think that if there are too many investigations and too many cases coming to court then that can have a chilling effect for free speech.

"This is about trying to get the balance right, making sure time and resources are spent on cases that really do need to go to court, and not spent on cases which people might think really would be better dealt with by a swift apology and removal of the offending tweet.

"This is not a get-out-of-jail card but it is highly relevant. Stuff does go up on a Friday and Saturday night and come down the next morning.

"Now if that is the case a lot people will say that shouldn't have happened, the person has accepted it, but really you don't need a criminal prosecution. It is a relevant factor."

But he said Twitter was not a place where people could "go and say what they like" without thinking of the circumstances.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

Figures released in December revealed crimes involving Facebook and Twitter have increased by 780% in the last four years, with around 650 people charged in 2012 for offences on social media sites.

Offences ranged from harassment, to stalking and grooming, as well as racial abuse, according to figures compiled by police forces.

But Mr Starmer hopes his guidelines will reduce the number of cases where jokes have been misplaced or someone has not obviously committed a crime going before the courts.

His comments follow a number of high-profile investigations which have later been over-turned.

The May 2010 conviction of Paul Chambers for joking on Twitter about blowing up Robin Hood Airport in South Yorkshire is a well-known case.

His conviction for sending a "menacing" tweet drew widespread condemnation and was eventually quashed on appeal in July.