A man caused "incalculable" harm when he disclosed highly sensitive information relating to UK defence, a court has heard.
Simon Finch, 49, is accused of one count of breaching the Official Secrets Act and one breach of the Regulation of Investigatory Powers Act.
The unemployed defence contractor from Swansea appeared at Westminster Magistrates' Court.
It follows a Counter Terrorism Command probe launched around 28 October 2018.
The court heard the alleged disclosure was triggered by a grievance Mr Finch had against Merseyside Police.
It heard police seized electronic devices from his home address as part of their investigation but he refused to provide the access codes for three of them, despite an order from a judge to do so.
Prosecutor Samuel Main told the court the harm caused by the disclosure had been "incalculable".
Chief Magistrate, Emma Arbuthnot put a contempt of court order in place limiting what can be said about the case and banning the publication of his image.
Under the 1989 act, a disclosure is considered damaging if it "damages the capability" of the Armed Forces, leads to loss of life, injury to its personnel or endangers UK interests abroad.
Prosecutions are rare, with usually no more than one in any single year.
Mr Finch was bailed to appear at the Old Bailey on 6 November.