Supporters of Mohammed Allan, a Palestinian prisoner on a hunger strike, hold a photograph of him (AP)

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

After a long day of deliberations, the court announced late on Wednesday that Mohammed Allan, on a hunger strike for 65 days, will remain in hospital but his shackles will be removed and his family can visit him.

Allan went on a hunger strike to protest against the measure that allows authorities to hold suspects for months without charge.

The court said Allan, who has suffered brain damage, will remain in hospital but can petition for his release if his condition improves.

The decision did little to resolve a debate over Israel's controversial practice of holding suspects without charge, or a new law permitting force-feeding of hunger strikers.

The case of Allan had appeared set to be the first test of the law before he fell unconscious last Friday.

Israel defends the practice as a necessary tool to stop militant attacks and arguing that revealing the charges would lay bare intelligence networks and put people's lives in danger. But rights groups say the measure violates due process and is overused.

The high-profile case took a dramatic turn earlier on Wednesday after the court ordered he undergo medical tests to determine the level of brain damage and said he would be freed if it was irreversible.

Doctors said results of the MRI were inconclusive.

Dr Hezy Levy of Barzilai hospital in southern Israel, where Allan is being treated, said the detainee was "incoherent" and "not connecting with his surroundings".

"There is some damage in a part of the brain that was probably caused by a lack of vitamins ... and it is expressed in other systems of his body," Dr Levy said.

He said Allan would be administered the substances his body is missing.

"I hope that it is reversible. I cannot predict right now to what extent it is reversible," he said.

Allan is in Israeli custody for his alleged affiliation with Islamic Jihad, a Palestinian militant group that has carried out scores of attacks on Israeli civilians and soldiers.

He denies the affiliation and launched his strike to protest against his being held for months without charge or trial.

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

Allan's lawyer, Sawsan Zaher, said he should be released even if the damage is not irreversible as it is still deep enough to prevent him from posing a threat.