A 14-year-old boy has been charged with trying to buy a Russian sub-machine gun and 100 rounds of ammunition on the dark web.
A detective said she believed the teenager’s intention was to intimidate another person.
The child was detained during a police operation at the Riverside retail park, in Coleraine, Co Londonderry, on Thursday morning.
He had allegedly tried to give £150 cash to a police operative for the ammunition, the detective said, and felt he could purchase the gun.
The detective constable from the Police Service of Northern Ireland (PSNI) told Ballymena Magistrates’ Court: “Speaking to the operative, the defendant had stated in communications that his intention was to intimidate a third party.”
He appeared in court accused of attempting to possess a firearm and ammunition with intent to endanger life.
The offences are alleged to have occurred between March 27 and April 7 this year.
The accused, wearing a grey hooded top and red T-shirt, appeared in court flanked by his father and three police officers.
During interview with police, he named a Jamaican man who he said asked him to collect blank ammunition and a deactivated gun.
He said he ordered these through a selling platform on the dark web, the detective said.
The accused told investigators he was to collect the deactivated gun in a few days, the detective constable added.
She added: “It was, in fact, a live gun and live ammunition.”
The detective added: “The account provided was somewhat unbelievable.
“He provided an account that he was purchasing a gun for a male that was a Jamaican national living in Northern Ireland who he was friendly with on Facebook.”
She said none of his Facebook friends matched the name given for the 40-year-old friend.
Defence lawyer Derwin Harvey said there was no evidence presented surrounding what his client’s intent was and described police assertions as “guesswork”.
District judge Liam McNally released the accused on bail of £500 and with conditions including staying at home overnight and not possessing a mobile phone or any other internet-enabled device.