A NED created a fake Facebook page in the name of a policeman who searched him for drugs then filled it with X-rated messages.

Gordon Campbell, 20, changed the name on his Facebook profile to that of PC Colin Simpson, even using a photograph of the officer from the official force website.

He went on to make a series of bogus posts in PC Simpson’s name, claiming he smoked dope, enjoyed pornography and abused his fellow officers.

Another cop stumbled across the fake page and tipped off the PC.

The shocked officer reported it to colleagues who swooped on Campbell’s home in Broomhill, Glasgow.

The incident happened after police union chiefs warned that putting officers’ photos on force websites could lead to them being targeted by criminals.

Last week, Campbell appeared at the city’s sheriff court and admitted creating the fake Facebook profile and posting homophobic and offensive comments in July 2011.

Campbell had been searched by PC Simpson earlier that month under the Misuse of Drugs Act but no action was taken against him.

A week later, his friend discovered the fake profile.

Prosecutor Mark Allan told the court that PC Simpson looked at the site and “was alarmed to see the comments”.

One of the fake posts, written by Campbell, said: “Man, traffic cops are gay as f***.”

Referring to smoking cannabis, he posted: “F*** sake I could smoke too much.”

Other messages suggested the policeman was a serial murderer, targeting black people.

Mr Allan said: “PC Simpson became extremely alarmed and distressed at the fact that people might believe that this was his genuine profile and that the comments displayed were representative of his views.

“This would be extremely damaging to his career and extremely embarrassing for him personally.”

Defence lawyer Niall McCluskey told the court that Campbell felt Simpson had been heavy handed when he searched him.

Mr McCluskey said: “He didn’t feel he had been fairly treated.”

He said that all comments on the page were posted before changing the name to PC Simpson and claimed the comment about traffic cops was in relation to a television programme.

The lawyer said Campbell’s comments were intended as a joke.

Sheriff Sam Cathcart deferred sentence on Campbell until next month and continued his bail.