A married prison officer who had sex with an inmate in a cleaning cupboard during an 18-month affair has been jailed for a year.

Rachel Welburn started a relationship with Daniel Crompton after she became his designated personal officer at Frankland Prison in Durham, England.

Crompton was serving life for murdering an 87-year-old war veteran in 2014 in a vicious attack after he broke into his home looking for cash.

Durham Crown Court was told that Welburn, 39, "kept going missing on her shifts" to have sex with Crompton, 29, in a cleaning cupboard in the prison.

The judge said the relationship would be “hugely upsetting” for the murder victim’s family.

View photos Daniel Crompton is serving life in prison for the murder of an 87-year-old veteran in 2014. Source: Greater Manchester Police. More

Crompton blew the whistle on the affair after realising that Welburn was not going to dump her husband – who was also a warden at the jail - as "an act of revenge or spite".

Mrs Welburn initially claimed that Crompton had raped her but was found to be lying when police found their love letters in his cell. The mother later admitted to misconduct in public office over the affair.

Lawyer Joanne Kidd, defending the prison officer, said Welburn's shame and regret were beyond measure.

“She cannot explain why she behaved in this way," she told the judge.

Judge Christopher Prince said: "The public do not expect prisoners, irrespective of the offences they have committed, to be engaging in sexual relationships when they should be serving their sentences”.

Prosecuter Robin Patton, said Crompton was jailed for life in 2014 for the “cruel murder” of Frank Worsley, a Second World War veteran, in his own home.

Mr Worsley served with the Royal Navy on five warships in the Far East during World War Two.

View photos Prison Frankland is category 'A' prison and it is where Rachel Welburn started a relationship with Daniel Crompton after she became his designated personal officer. Source: Getty Images. More

"We could be more accepting of his death if it had been of old age, peaceful and dignified,” Mr Worsley's family said in a statement following his murder.

"Instead it wasn't peaceful, he wasn't comfortable, he was scared, agitated and distressed as a result of this callous attack.

"He was in pain and there was nothing that could be done. It wasn't easy to watch him lose his fight for life over the following two and a half weeks.

"We are very pleased with the verdict, although we will never fully recover from this traumatic loss."

-Yahoo UK.

Do you have a story tip? Email: newsroomau@yahoonews.com.

You can also follow us on Facebook and Twitter, download the Yahoo News app from the App Store or Google Play and stay up to date with the latest news with Yahoo’s daily newsletter. Sign up here.