Israel's Supreme Court has suspended the detention order of a hunger-striking Palestinian prisoner, releasing him while he receives medical care.

Mohammed Allaan, who had refused food for 65 days, ended his hunger strike in front of medics at the Barzilai hospital after the ruling late on Wednesday.

After a long day of deliberations, the Supreme Court announced that Allan, who doctors said has suffered brain damage, would remain hospitalised, but that his shackles would be removed and his family can visit him.

Supreme Court spokeswoman Ayelet Filo told Al Jazeera that if Allaan's condition does not improve, his administrative detention will be cancelled permanently.

Inside Story: Is force-feeding a form of torture?

The medical director at Barzilai Medical Center said Allaan had suffered brain damage due to vitamin deficiency. It remains unclear whether the damage is reversible.

Allaan was detained for alleged affiliation with Islamic Jihad, a Palestinian armed group. He denies the affiliation, and launched his strike to protest his being held without charge or trial.

Administrative detention allows authorities to hold suspects for months without charge. Israel defends the practice as a necessary tool to stop attacks.

Rights groups say the measure violates due process and is overused.

Israel's public security minister said on Wednesday that releasing Allaan would encourage more Palestinian detainees to wage hunger strikes.

His case has triggered debate over Israel's controversial practice of holding suspects without charge, and a new law permitting force-feeding of hunger-striking prisoners.

Allaan's rapidly deteriorating health had caused a split between Israeli politicians, who recently enacted a law demanding that he be force-fed, and medics, who have been refusing to comply on the grounds that to do so would be unethical.

The Palestinian Prisoners Society issued a statement considering the Israeli Supreme Court decision to suspend Allaan's administrative detention a way to circumvent his strike and evade releasing him. 

Source: Al Jazeera and agencies