Hundreds of police employees have been investigated for breaching social media guidelines at forces across England and Wales during a five-year period.

Police officers and civilians made racist and threatening comments on Facebook and Twitter, sent "friend" requests to victims of crime and uploaded images of colleagues in "compromising positions".

A total of 828 cases were reported to police bosses, ranging from social media gaffes to sackable offences that threatened to bring forces into disrepute, according to documents obtained by the Press Association.

About a seventh (14%) of investigations resulted in no further action or finding there was no case to answer. Nearly one in 10 cases (9%) ended in resignation, dismissal or retirement.

In Lancashire, a civilian employee received a written warning over derogatory remarks posted on their Facebook page about a police community support officer (PCSO) who had issued the staff member with a fine for dog fouling.

The same force took management action against a PC who allegedly made inappropriate remarks on Facebook about someone else's wife.

A fellow constable resigned over "excessive and inappropriate use of the internet during working hours", in particular online auction sites, internet banking and social networking sites.

A colleague received counselling over a Facebook photo of the staff member asleep while on duty in the control room.

According to Gwent police, a PC acted inappropriately when, while attending a woman's home, asked her to become a friend on Facebook, later posting a message on the site. The constable received a written warning.

Another PC received the same punishment after using Facebook to send a message to a member of the public which was of an "abusive nature".

A PCSO with Devon & Cornwall police received a final written warning for posting photos on Facebook of themselves with weapons.

A sergeant with the same force received a written warning after putting remarks on Facebook displaying disloyalty to force and remarks about senior officers.

An employee with the Dyfed Powys force was accused of being "threatening, bullying and intimidating towards a complainant by sending private messages via Facebook".

Two special constables in Northampton resigned after they were pictured on Facebook in a "compromising position".

According to Nottinghamshire police, employees receiving management action included a constable who chatted on Facebook with a member of the public and posted "confidential information concerning an upcoming police operation", while another posted comments "regarding their dissatisfaction at having to work on an upcoming police operation".

A civilian employee posted a comment on Facebook regarding the actions of Muslims in central London failing to observe a two-minute silence.

It was alleged the language used "could be regarded as offensive, inappropriate or likely to cause offence to other persons", police said.

A civilian with South Yorkshire police was accused of harassing an ex-partner via Facebook. They resigned prior to misconduct proceedings.

Similarly, Suffolk constabulary said a sergeant was reprimanded after accessing an ex-partner's private Facebook account.

They received a misconduct hearing regarding this and other matters, and were eventually dismissed.

A member of police staff in Wiltshire resigned after an investigation that he or she "demonstrated inappropriate behaviour" by posting a comment on the official force Facebook site in relation to the police authority rescinding their decision not to pay police staff their pay rise in 2010.

Various forces also said there were investigations into comments that were deemed homophobic, racist or "religiously aggressive".

Greater Manchester police reported the most investigations (88), followed by West Midlands (74) and the Met (69).

A total of 13 forces reported having 10 or fewer investigations between January 2009 and February 2014.

Additional details provided by most forces under freedom of information laws showed 548 of those investigated were police officers, 175 were civilian staff and 31 were PCSOs.

Guidelines from the Association of Chief Police Officers state officers and police staff should avoid using the internet while off-duty or after having drunk alcohol, due to the potential for their judgment to be impaired.

They also warn of criminals trawling the internet to identify personal information about police employees "with a view to embarrassing, discrediting, harassing, corrupting or blackmailing them or their families for their own benefit".

The guidelines add: "It is recommended police remove personal details from the edited electoral roll, ensure telephone numbers are ex-directory, ask Google maps to remove pictures of their house, car or persons."