A prison officer who had a baby by an inmate in her charge has been sentenced to 30 months in prison.

Kelly-Anne McDade admitted misconduct in a public office after a love-affair with “dangerous offender” Nelson Delgado.

“She fell in love with this serving prisoner, who was nearly 10 years her junior,” Richard Germain, defending 31-year-old McDade, told the court. He added that, at some point in the future, the pair hope to set up home and bring up the child together.

Download the new Independent Premium app Sharing the full story, not just the headlines

“There is no doubt it was an inappropriate relationship, but Ms McDade would say ‘You can’t help who you fall in love with’,” Mr Germain said. However, Judge Christopher Tyrer told McDade that “Love is not an excuse.”

In a bid to keep in touch with 21-year-old Delgado after the birth of their child, McDade tried to send him three mobile phones concealed within a stereo. Delgado had been moved to a Staffordshire Young Offenders’ Institute after the affair was uncovered. He was being held for robbery and assault of an elderly couple.

Police also found a mobile phone in her home with a message from Delgado, whom she regularly visited, which read: “I love you, my wife.” Passing sentence at Aylesbury Crown Court, Judge Tyrer called McDade’s behaviour “disgraceful.”

Nigel Ogborne, prosecuting, told the court that McDade, of Aylesbury, said she had fallen pregnant after a relationship on a foreign holiday when quizzed by the prison authorities. When the prison governor found out Delgado was the father, he said the relationship “could have caused a massive breach of security”, Mr Ogborne added.

McDade had been employed at Aylesbury Young Offenders’ Institute in Buckinghamshire for three years before the affair started. She resigned after she was caught by CCTV camera opening Delgado’s cell after all doors had been closed for the night in August last year.

She was sentenced to 18 months in prison for trying to smuggle the mobile phones, to be followed by a further 12 months for misconduct in public office. The judge ordered a one-month sentence, to be served concurrently, after McDade also admitted possession of skunk cannabis found at her home.

Judge Tyrer told McDade that Delagdo was in her care and that she was supposed to be looking after him as a prison officer. He said: “Your training would have warned you what to do if your feelings for him, as they did, crossed the line.

“Not only did you frequently have a sexual relationship with him, but you became pregnant by him and that means that you abused your position as a prison officer, and the trust placed with you by your colleagues, your superiors and the public.”

He said the move could have placed female colleagues at risk from male offenders who knew of the affair, adding: “Prisoners might have expected the other female officers might have been susceptible to similar approaches. The consequences for them could have been very serious.”

McDade was arrested after she sold her story to Closer magazine for £1,000.