A prison officer who had a fling with a "dangerous" inmate at Berwyn prison, Wrexham, has been jailed for 12 months.
Ayshea Gunn, 27, exchanged explicit videos and live footage on mobile phones with Khuram Razaq, serving 12 years for conspiracy to robbery.
Mold Crown Court heard photos of them hugging and kissing - some taken in his cell - were found in her bedroom.
Gunn, from Johnstown, Wrexham, admitted misconduct in public office between July and November last year.
The court heard she had been a probationary officer at the Category C prison at the time, having begun working there shortly before it opened in February 2017.
The prosecution said Razaq - who on one occasion had directed Gunn to perform sex acts on live video - had formed a "grossly inappropriate" relationship which had contributed to her downfall.
Gunn had also smuggled a pair of knickers into the jail for him hidden in her bra.
Judge Niclas Parry told Gunn: "This case is all about breaching trust and you were the person trusted."
He added: "Over a period of some months, infatuated, you did exhibit selfishness on a staggering scale."
Razaq, 29, who was dealt with separately, must serve a consecutive eight month jail term after he pleaded guilty to possessing a smartwatch and a mobile phone in prison.
The judge told him: "You are clearly a dangerous man. Before the age of 30 you have received two sentences in double figures."