Image caption A bail application was made in the High Court on Wednesday

A man has appealed to a judge to be freed from prison to take a lie detector test on the Jeremy Kyle Show, the High Court in Belfast has heard.

Frederick Boyd, 22, formerly of Mark Street, Newtownards, County Down, wants to go on the television chat show to clear his name.

It is in connection with allegations not before the court, his lawyer said on Wednesday.

A judge granted bail after Mr Boyd's grandmother agreed to move in with him.

Mr Boyd faces charges of disorderly behaviour. It is alleged that he scaled a pillar at the front of City Hall, Belfast, on 23 January, draped in union flags, and shouted obscenities at passers-by.

He later claimed loyalist paramilitaries had put a gun to his head and told him to do it. He was charged and released on police bail, only to be detained again after a further incident on 15 May in Larne, County Antrim, where he now lives.

A prosecuting lawyer said Mr Boyd approached a shop owner in the town, called him a "PSNI tout", and lunged at him with a screwdriver.

There was a brief struggle and he ran away. He was arrested, but there was no sign of a screwdriver.

Mr Boyd faces charges of assault and possession of an offensive weapon with intent.

'Targeted in prison'

At his bail application, a defence barrister said Mr Boyd had been targeted and injured in prison. Those alleged attacks were in connection with a separate incident that was not before the court.

Now Mr Boyd believes an appearance on the ITV's Jeremy Kyle chat show would stop the attacks.

"He tells me one of the reasons he's desperate to be released on bail is that he's determined to try and take a lie detector test," his lawyer said in the Crown Court in Belfast on Wednesday.

"He thinks the best way to do that is on the Jeremy Kyle TV show."

Asked by the judge if that was anything like the Stephen Nolan Show, on BBC Radio Ulster, Mr Boyd described it as "more extreme".

The judge replied: "I can't for a minute imagine that."

Boyd's grandmother, Kathleen Boyd, told the court she was prepared to move to Larne to live with her grandson.

Granting bail on that basis, the judge imposed a curfew, alcohol ban and prohibition on entering parts of the town. He also ordered electronic tagging after Mr Boyd asked him to include the condition to ensure police could not accuse him of any breach.

Directing the accused to seek medical help within three days, the judge told him: "You're only 22 years of age and you look about 45. You can't go on like this. You have to get your life sorted out."