Personal details of up to 87 police officers have allegedly been passed to inmates in a high security prison in Northern Ireland by a jailed ex-policeman, a court has heard.

Kyle Martin Jones, 27, is accused of handing over the lists inside HMP Maghaberry, Co Antrim, during the last three months in exchange for coffee, cigarettes and food.

The former officer from Ballyclare, Co Antrim, who had been on remand in the prison on robbery charges, appeared at Craigavon Magistrates' Court charged under the Terrorism Act with collecting information that could be used by terrorists.

A detective told district judge Alan White that the documents contained extensive details about Jones's former colleagues in the Police Service of Northern Ireland (PSNI), including names, family relationships, vehicles they drove and lifestyle and personal habits. Both serving and retired officers were mentioned.

The court heard that during police interviews Jones, who served in the PSNI from 2005 to 2010, admitted compiling the lists, but insisted there was no sinister intent, and he had instead produced them for "therapeutic purposes".

In two prepared statements handed to detectives, he also claimed he had compiled a list containing details of 51 people from his university days.

Jones, who had been released from Maghaberry on bail late last month, was arrested on Wednesday and taken for questioning at the PSNI's Serious Crime Suite in Antrim.

The detective said he initially answered "no comment" to all questions. The officer said the suspect then consulted his solicitor and at the next interview produced two pre-prepared statements.

In them he admitted to being the author of the list. He claimed he had also compiled details of 45 other officers and 51 people from his time at university. But he denied malicious intent.

He remanded Jones in custody to appear before court via videolink at the end of the month.