An Israeli military court has ordered the detention of a group of Palestinian legislators from Hamas until the end of judicial proceedings against them.
The Hamas detainees refuse to recognise the court's legitimacy
The decision reverses an earlier ruling ordering the release of the legislators on bail until they faced trial.
The group includes three members of the Hamas-led Palestinian government who were seized after Palestinian militants captured an Israeli soldier in June.
They are charged with membership of an illegal terrorist organisation.
"The state of Israel has the right to defend itself against terror. Terror will not be allowed to continue," the appeals court said in its ruling.
The BBC's Wyre Davies in Jerusalem says there has been speculation that the politicians could be released as part of a prisoner-swap with the abducted soldier.
A lawyer for the detained politicians told the BBC that the decision was "purely political".
"I think that really the criminal here is the occupation and not the Palestinian representatives," said lawyer Taleb al-Sana.
Among those facing charges are Parliament Speaker Aziz Dweik, Religious Affairs Minister Nayef Rajub, Jerusalem Affairs Minister Khalid Abu Arafa and Local Government Minister Issa al-Jaabari.
Palestinians in the West Bank are tried in Israeli military courts because the territory has been occupied by the Israeli military since 1967.
Hamas does not recognise the legitimacy of Israel and the defendants do not acknowledge the authority of the court.