RAMALLAH, West Bank — The Israeli Supreme Court cleared the way on Wednesday for the temporary release of a Palestinian prisoner whose two-month hunger strike might have left him with brain damage.

The health of the prisoner, Mohammad Allan, 31, a lawyer and member of a militant Palestinian group who has not eaten since June 16 to protest his indefinite incarceration, had worsened since Israel passed a law last month that allowed the force-feeding of hunger strikers.

On Wednesday, a medical examination found that Mr. Allan had suffered brain damage because of his fast, although it was not clear if the damage was permanent.

Mr. Allan’s case has presented Israel with a difficult choice: release him and capitulate to the demands of hunger strikers, or risk unleashing violence if he dies.