Israeli prosecutors have charged two Israeli Arab activists with spying for Hezbollah, it has been revealed.
Amir Makhoul and Omar Sayid confessed that they passed information about Israeli bases to the Lebanese militant and political group, the charges say.
They sent information to their Lebanese contacts over the internet using sophisticated encryption programmes, prosecutors said.
Lawyers for the accused men say their confessions were made under duress.
The men were interrogated by Shin Bet, the Israeli secret service.
The case had been subject to an Israeli court gagging order which has now been lifted.
The charges say both men met Hezbollah agents in 2008.
Mr Makhoul met a Lebanese businessman on a trip to Denmark, and Mr Sayid met a man in a cafe in the Egyptian resort of Sharm al-Sheikh, it is alleged.
According to the trial documents the men agreed to pass information about Shin Bet, the Israeli Defense Forces and other military installations in the north of the country.
They were also asked to recommend other people that Hezbollah could contact who might be open to working with them.
It was alleged that Mr Makhoul had placed encryption software on his laptop computer to aid communication with his handlers, but had destroyed the laptop after the arrest of another alleged agent.
He was also charged with giving details of the home address of the head of the Shin Bet.
Adalah, the Legal Centre for Arab Minority Rights in Israel, which represents the men, says the charges are false.
They allege the interrogators used sleep deprivation and stress positions to extract confessions, which both men have now retracted.
"Trumped-up accusations made in indictments have become alarmingly common practice in security cases in Israel," a statement from the organisation said.
"They aim to justify the complete isolation and use of illegal methods of interrogation against detainees, and the imposition of gag orders on their cases."
A Shin Bet official was quoted by the Israeli media as saying the interrogation was done "in full accordance with the law".
Mr Makhoul was charged in a Haifa district court, while Mr Sayid appeared at a district court in Nazareth.
Mr Makhoul is the director of Ittijah, the Union of Arab Community-Based Associations, the brother of a former Israeli-Arab member of Israel's Knesset, or parliament, and an outspoken critic of Israel's treatment of Palestinians and Israeli Arabs.
Mr Sayid is a member of the Israeli-Arab political party Balad.
When he was brought into the court Mr Sayid, 50, looked tired, a BBC reporter in the Nazareth district court said.
His wife and three daughters called out to him - it was the first time they had seen him since his arrest in April - and he waved and told them he was alright.
The court room was packed with abut 100 reporters, cameramen, family members and supporters of Mr Sayid, including Israeli-Arab Knesset members.
The media are barred from sitting in court during preliminary hearings but they were allowed to ask questions of Mr Sayid before the judge entered.
He denied the charges and said he had been forced to make a confession.