A judge has called for changes in the law after a sinister pervert could not be prosecuted for stealing the identity of a 14-year-old schoolgirl to indulge in sick sex chat on Facebook.

Daniel Mason took photos of the girl from her genuine page to set up the false one and hide behind it, Bradford Crown Court heard.

He assumed her name in text messages, suggesting performing a sex act in front of a child.

The police were alerted and Mason’s home in Embsay, near Skipton, was searched. Two laptop computers containing child pornography were seized.

Mason, 34, pleaded guilty to ten offences of making and possessing indecent images of children and images of extreme pornography, including a woman having sex with an animal.

Now living in the south of England, he was yesterday sentenced to a three- year community order.

Judge Colin Burn expressed concern that Mason had never faced any charges for stealing the identity of the teenager.

Prosecutor Duncan Ritchie said there was no offence that Mason could be charged with for impersonating the girl on Facebook for sexual purposes.

It was only after 17 indecent images were found on the computers that the law was broken.

Mr Ritchie said the schoolgirl had no knowledge of what Mason was doing. Her family was very distressed by what had happened.

Judge Burn said it was “sinister conduct” that could have put the girl at risk. He was told Mason posed as the girl to send sexual texts and Skype messages.

Mr Ritchie said Mason downloaded the child porn, featuring girls from the age of 13, in 2008, but he had accessed the images as late as May 2011.

Mason’s barrister, Tina Landale, said he was appalled, ashamed and troubled. Estranged from his family, he had blighted lives with his inexplicable conduct.

“The offences are old and out of character,” Miss Landale said.

Judge Burn ordered Mason to attend an accredited sex offender programme.

He must sign on the sex offenders’ register for five years and a Sexual Offences Prevention Order safeguards children from him in the future.

He was also ordered to pay £1,000 costs.

Judge Burn said the most serious aspect of the case had attracted no criminal charges.

“It is something that needs to be addressed by legislators,” he said.