A man who carried out sexually explicit conversations with who he thought was a 13-year-old girl was actually chatting to an undercover police officer, a court heard.
Andrew Berry - who went by "Randy Andy" on a dating site - was unaware that he had been speaking to an undercover policewoman, and was swiftly arrested by officers waiting at the spot he had arranged to meet the schoolgirl in a busy train station.
According to Wales Online, the 49-year-old denied messaging the "girl", stating that his email account was hacked and maintaining it was coincidental that he turned up to the railway station that day.
Cardiff Crown Court heard how Berry began messaging a profile on the website Fast Flirting, which he thought belonged to a 13-year-old girl named Molly, in July last year.
Marian Lewis, prosecuting, said the profile was actually being run by an undercover policewoman, and "Molly" made her age clear to Berry.
The pair exchanged phone numbers and email addresses, and over the following days Berry engaging in a series of "sexual conversations" with her.
During the communications the defendant urged what he believed to be a schoolgirl to perform sexual acts on herself, and in some of the calls could be heard "moaning" as he apparently masturbated.
The court heard the pair talked about meeting, and Berry told her to wear a skirt and no underwear, and said he wanted to have sex with her.
The prosecutor said that on Friday, August 6, the pair made arrangements to meet the following day at Cardiff railway station, with Berry telling Molly he would accompany her back to Swansea "to show her his city".
The next day Berry took a train to Cardiff, and the communication between the pair continued during the journey - he told Molly he would be arriving at platform two of Cardiff Central at 2.20pm and would go to meet her on platform seven, her train already having arrived.
Officers saw Berry alight from the train at the allotted time and make his way to platform seven where he was arrested.
In his subsequent interview Berry denied ever having contacted Molly on Fast Flirting, Skype or by text, and said his email must have been hacked.
He denied he had travelled to Cardiff on the train in question to meet the girl, saying it was just a coincidence, and said he had only gone to platform seven in search of the toilets.
Berry accepted using the Fast Flirting site - indeed that was how he had met his partner - but denied being "Randy Andy" and refused to disclose his password.
Andrew Paul Berry, of Ozanam Court, Portmead, Swansea, had previously pleaded guilty to attempting to arrange a child sex offence, attempting to engage in sexual communication with a child, attempting to incite a girl to engage in penetrative sexual activity, and attempting to meet a child following grooming when he appeared in the dock for sentencing.
The Preston-born man has two previous convictions on his record including one from 1999 for indecently assaulting a woman.
Helen Randall, for Berry, said the defendant had accepted his wrongdoing in his pre-sentence interview with probation, something not all offenders in such cases did.
Judge Niclas Parry told Berry he had engaged in "highly sexually explicit conversations" with Molly, and he was in no doubt that had the person the defendant been messaging been a real girl, he would have had sexual intercourse with her.
Giving the defendant a one quarter discount for his guilty pleas the judge sentenced him to four years in prison.
Berry will serve up to half that period in custody before being released on licence to serve the remainder in the community.
He will be a registered sex offender for the rest of his life, and was made the subject of an indefinite sexual harm prevention order to control his access to the internet and access to young girls.