A woman who plotted to let a paedophile rape her seven-year-old daughter has been jailed for nine years.

The woman, who cannot be named for legal reasons, planned a sexual attack on the girl with Stuart Bailey in a series of “depraved” text messages, Cardiff crown court heard.

She also sent the 54-year-old a naked picture of her daughter and bought sleeping pills to drug her, the court was told.

The pair exchanged dozens of messages and the offences only came to light when the woman’s partner found the messages on her phone and reported her, the court heard.

Bailey, who was jailed for a total of 13 years, and the woman were found guilty of conspiracy to rape a girl aged under 13 after a trial in December.

Bailey, of Rhydyfelin in Pontypridd, south Wales, was also convicted of encouraging the distribution of indecent photographs of a child and encouraging the sexual assault of a child by another woman.

At an earlier hearing the woman admitted distributing five indecent images of a child and Bailey admitted possessing those images.

The judge, the recorder of Cardiff, Eleri Rees QC, said Bailey was prolific in contacting a number of women on the dating website Plenty Of Fish. She said a pattern emerged whereby Bailey quickly turned to talking about perverted and unlawful sexual activity, seeing how far he could push the women.

“The discussion, unless cut short by the women, would then escalate to you encouraging them to [engage in] sexual activity with children,” she said.

Officers began investigating in June last year after the woman’s then partner found the messages and she was arrested, Rees said. The investigation led police to Bailey who, it was discovered, was having similar discussions with other women.

Rees said of the pair: “You met once face to face for sex. During that encounter you, Bailey, saw a photograph of [the woman’s daughter].”

The mother later posed her daughter naked in the bath, exposing her genitals, to take pictures to send to Bailey. Another image showed the girl in school uniform with her underwear exposed, the court heard.

Rees said the pair claimed they never had any intent to carry out the content of their “depraved discussions of a perverted sexual nature”.

The mother, who was described as “vulnerable and gullible” by Rees, asked Bailey at one point what she would get out of the plan to rape her daughter and Bailey responded by mentioning sums of £200 to £300, the court heard.

The pair planned to rape the girl during the Whitsun school holiday and talked about drugging her. Rees said that despite speaking to her GP, who advised against giving a child melatonin, the mother went ahead and bought some online.

“By your own admission you tried it out a week before the rape was due to take place,” she said.

Lucy Crowther, for Bailey, said her client was “totally ashamed of his behaviour and his actions, which he acknowledges will affect his grown-up children and his partner, who is currently standing by him”.

Alex Greenwood, defending the woman, said social services had identified her as a person at risk of being manipulated by men prior to the offences and that was what had happened.

He said she had been “bullied, cajoled and blackmailed” by Bailey.

Both defendants were made the subject of sexual harm prevention orders and given one year of additional licence to serve.