A father had sex with a 14-year-old schoolgirl at his home while his young children slept nearby.
Andrew Apolojohanaangels met the girl when she was 13 on the social networking site Bebo.
The 33-year-old met the girl, accompanied by his two young children, aged seven months and five years, at a railway station after she had turned 14.
He took the child back to his Livingston home where he had unprotected sex with her, in April last year.
The offence was uncovered when the girl, worried she was pregnant, contacted her cousin and her aunt became aware of what had happened.
Apolojohanaangels, a father-of-three, was jailed for ten months and placed on the sex offenders register at the High Court in Edinburgh on Thursday after previously admitted twice having sex with the girl.
He had been accused of raping the 14-year-old girl, but the Crown accepted his guilty plea to a lesser charge.
The judge, Lord Doherty, said: "I have not found this an easy case to deal with. This was a serious offence, which in my view, involved a considerable degree of planning on your part."
Defence counsel, Maggie Scott QC, said there was nothing to suggest Apolojohanaangels groomed the girl, and said he has expressed "shame and remorse" for what he did.
Apolojohanaangels started communicating with the young girl, who claimed on the site to be 16, late in 2009.
The girl, who cannot be named, told her parents she was going to stay with a school friend and went to the train station to meet Apolojohanaangels.
They travelled from Glasgow to Livingston and Apolojohanaangels took her back to his home, putting his children to bed before taking the girl to his room and having sex with her.
She contacted her cousin the next day, saying she was worried she may be pregnant because she had a sore stomach.