Former Lostprophets singer Ian Watkins used a smuggled mobile phone to contact a former girlfriend from his cell in Wakefield Prison, a court heard.
Jurors were told the convicted sex offender handed over the phone to prison staff so he would not miss out on a visit from his mum.
Watkins, 42, is on trial at Leeds Court Court where he is charged with possessing a mobile phone in prison between March 4 and 10 last year.
Stephen Wood, prosecuting, told the court: "The defendant Ian Watkins was at the material time a serving prisoner at HMP Wakefield.
"He is the former front man of a well known rock group called the Lostprophets."
Mr Wood said the prison received information from Watkins' ex-girlfriend that he was in possession of a mobile phone.
The prosecutor said Watkins was searched but nothing was found on him.
He said: "The defendant was asked during the search if he had a mobile phone about him and the defendant replied that he did not."
After the search Watkins told the officer that his mother was due to visit him at the prison later that afternoon.
Watkins asked if the visit would still go ahead and the officer told him that it would be up to the deputy governor.
Watkins was returned to his cell where he was observed every 15 minutes.
When one of the officers went to check on him, Watkins asked the officer if he could have the visit with his mother if he "handed something over"
Mr Wood said: "The officer asked the defendant if he had a mobile phone on him and he replied that he did."
The prosecutor said the officer then went to get some latex gloves and a bowl.
When he returned the officer saw Watkins reaching into his underwear and after ten seconds produced a small white mobile phone.
Mr Wood said: "This must have been inserted in to the defendant's anus.
"He was instructed to put the phone into the bowl."
The eight centimetre-long GT Star mobile phone was shown to the jury by the court usher.
Watkins' cell was searched and a small charger was recovered.
Pieces of paper were found in his cell containing names and numbers.
The defendant was questioned by police and claimed other prisoners on the wing had threatened him and forced him have the phone.
He said the prisoners wanted him to ring his "groupies" so they could extort money from them.
Mr Wood said: "What he was doing, it seems to the prosecution, is raising the defence of duress.
"The prosecution say quite simply that the defendant's talk of being threatened was not a truthful one.
"Even if there was a threat to him he was certainly not in imminent danger of death or physical injury."
Watkins' former girlfriend, Gabriella Persson gave evidence at the trial.
She described how she first met Watkins when she was 19 and had been a fan of his music.
Ms Persson said she had had been in a relationship with him until 2012.
She described the first message she received from Watkins while he was in custody.
She said the message read: "Hi Gabriella, Ella, Ella, Hey Hey Hey'
Ms Persson said the message was a reference to the Rihanna song Umbrella.
She told the court she went on to have a mobile phone conversion with Watkins.
She said Watkins told her that she couldn't get into trouble for talking to him.
Mr Wood asked: "What about him getting into trouble?"
The witness replied: "He said he could get in to trouble but it was worth it because he could speak to me."
Ms Persson said she later discovered that she could get in to trouble for being in contact with Watkins.
She said: "I spoke to my partner about it. I was very scared and I made the decision to contact the prison to let them know."
The prosecutor asked: "After you contacted the prison, did you have any further contact with that phone?"
She said: "I sent one text message which was a smiley face in reference to another text he sent me."
The woman said she later deleted the text messages she had received from Watkins.
She said: "I was scared and I just wanted it out of my phone."
The trial continues