A Welsh Premier League footballer who posted an abusive message about Olympic diver Tom Daley will not face charges, the Director of Public Prosecutions has said.

Daniel Thomas's message was "not so grossly offensive that criminal charges need to be brought", Keir Starmer said.

New guidelines for prosecutors on social media cases will also be issued, given the growing number of complaints, he added.

Daley, 18, and diving partner Pete Waterfield missed out on a medal at this summer's Olympics when they finished fourth in the 10m synchronised dive.

The Port Talbot Town FC midfielder posted a homophobic message on Twitter, which was later distributed more widely, leading to his arrest.

Mr Starmer said: "This was, in essence, a one-off offensive Twitter message, intended for family and friends, which made its way into the public domain.

"It was not intended to reach Mr Daley or Mr Waterfield, it was not part of a campaign, it was not intended to incite others and Mr Thomas removed it reasonably swiftly and has expressed remorse. Before reaching a final decision in this case, Mr Daley and Mr Waterfield were consulted by the CPS and both indicated that they did not think this case needed a prosecution."

But Mr Starmer said "the time has come for an informed debate about the boundaries of free speech in an age of social media". New guidelines were needed because this was just one of a growing number of such cases and there were likely to be many more, he said.

Estimates show there are 340 million messages a day sent on Twitter alone and "banter, jokes and offensive comment are commonplace and often spontaneous", he said. "Communications intended for a few may reach millions."

Mr Starmer went on: "To ensure that CPS decision-making in these difficult cases is clear and consistent, I intend to issue guidelines on social media cases for prosecutors. In the first instance, the CPS will draft interim guidelines. There will then be a wide public consultation before final guidelines are published."