An automatic pistol and live ammunition have been found at the Fife home of a member of the banned loyalist paramilitary organisation, the UDA.
Moffat pleaded guilty at the High Court in Edinburgh
Steven Moffat, 45, from Buckhaven, pleaded guilty to belonging to "a proscribed organisation", within the meaning of the Terrorism Act 2000.
Moffat admitted a further breach of the Terrorism Act by possessing handgun ammunition, clothing and other items.
He was remanded in custody until his sentence next month.
The High Court in Edinburgh heard how Ulster Defence Association paraphernalia was found in Moffat's flat.
First offender Moffat originally denied membership of the banned organisation but when detectives drew attention to the UDA tattoo on his arm he admitted he had been asked to join in a Belfast pub three years earlier.
The charge said that the discovery of the handgun gave rise to suspicion that it was for the purpose of preparing or instigating an act of terrorism.
Moffat also pleaded guilty to two Firearms Act charges relating to the 9mm Browning pistol and two magazines of 9mm ammunition found during the search of his flat on 10 February.
Solicitor advocate Gordon Martin, defending, said jobless Moffat had family connections in Northern Ireland and had been a long-standing member of the Orange Order and sympathetic to the notion that Northern Ireland should remain within the UK.
He said: "He appears to have been a frequent visitor to Northern Ireland to visit family, in particular his son, and met individuals in licensed premises and became involved in conversations with those individuals.
Remanded in custody
"Perhaps in drink and in bravado he was persuaded to join that particular organisation."
Mr Martin said once a member, the UDA was not the kind or organisation one could easily leave.
"He involved himself in something way over his head," the lawyer added.
Advocate depute Adrian Cottam, prosecuting, said that in a football boot bag under the mattress they found the Browning wrapped in cling film.
Firearms experts said it was in full working order.
Moffat claimed he had been given the bag to keep for someone else.