A British citizen is being detained in Israel on suspicion of transferring money and phones to terror groups.
Lebanese-born Mahmoud Sherari claimed he was violently interrogated while in Shin Bet custody.
According to the military prosecution, Mr Sherari, who has lived in the UK for the past 23 years and is 49 years old, entered Israel from Jordan in September, and was arrested four days later when he tried to leave.
He is accused of having contact with Hamas members, and of handing over to them telephones and tens of thousands of dollars.
According to the indictment, Mr Sherari was originally contacted by Hamas during his visits to Lebanon. His lawyers claimed in the military court that he had confessed to the charges following an interrogation session.
They said it included him being shackled for a prolonged period in a painful position and being threatened by his questioners.
The military judge accepted the claims and ordered Mr Sherari be released, criticising the security service.
But the Shin Bet appealed against the ruling, and a more senior judge ruled last Thursday there was no evidence of the suspect being ill-treated during questioning.
The British Foreign Office has confirmed Mr Sherari is a UK national, but little else is known about his time in Britain.