A paedophile who arranged to meet a 12-year-old girl for sex after meeting her on the internet has escaped a jail term.

Daniel Braham, 25, of Earlsfield, sent the girl a photo of himself performing a sex act and arranged to meet her and a friend for sex.

But their plan unravelled when her parents looked at her laptop and mobile as punishment for skipping school and found explicit photos of him.

When officers arrested Braham, they found 111 photos and videos of child sex abuse on his computer, ranging from the lowest level to the most serious.

But at Coventry Crown Court last week he insisted that he thought she was at least 14 and received a suspended sentence after pleading guilty to admitted sending the girl a photo of himself performing a sex act, and possessing indecent images of children.

Judge Richard Griffith-Jones told Braham he had escaped custody “by the skin on his teeth” because the case had taken three years to get to court and because of his previous good character.

He said: “You could have no argument if you had gone to prison today for the best part of a year.

“That would have been justified because of the gravity of the offence.”

Braham was jailed for 30 weeks, suspended for two years, and ordered to complete 80 hours of unpaid work.

The court heard the Coventry schoolgirl had pretended she was 16 and the pair swapped explicit photos of themselves.

They arranged to meet for sex, and the girl said she would bring a friend along for a threesome.

The court heard Braham, who was 22 at the time, thought the girl was aged between 14 and 16, but not as young as 12.

He told the judge: “There was no indication she was younger than 14. I believed from looking at her she was 15 or 16.

“It was the sort of conversation you would not expect someone of that age to be having.

“I just went along with it.”

In interview Braham blamed his heavy cocaine use but claimed he would never have actually met the girl.

Eugene Hickey, prosecuting, said the girl told Braham she wanted sex because “all my other mates have done it”.

He added: “She very much entered into the spirit of all this.”

Delroy Henry, defending, said Braham had never been in trouble with the law before.

Braham must sign the sex offenders register for seven years and attend a sex offenders’ treatment programme.

He was also made the subject of a sexual offences prevention order for five years, which restricts his internet use, and was ordered to pay £1,100 costs.