Palestinian prisoner Khader Adnan announced Tuesday that he will be ending his 66-day hunger strike after Israel agreed to release him.

The Islamic Jihad operative, who has been fighting a provision that allows Israel to hold detainees for months or even years without trial or formal charges, reached an agreement with the state prosecution less than an hour before his case was discussed at the Supreme Court.

According to a Justice Ministry statement, the state will not request to extend Adnan's administrative detention, which is due to end on April 17.

Adnan, who is hospitalized in Ziv Hospital in Safed, announced that he will be ending his hunger strike. Since an agreement was reached, there will not be a hearing at the Supreme Court.

Adnan continued his hunger strike longer than any Palestinian detainee before him. His doctors warned this week that the 33-year-old might die soon.

The hunger strike has transformed Adnan into a Palestinian hero, with thousands protesting in support of the once obscure bearded baker. The Iranian-backed Islamic Jihad had vowed revenge if Adnan died, possibly by firing rockets into Israel from Gaza. The group has killed dozens of Israelis in suicide bombings and other attacks. Adnan was once a spokesman for the group. It's unclear if he ever participated in any attacks.

Adnan is serving four months in administrative detention. Israeli military judges can imprison defendants for up to six months at a time, with the possibility of renewing the detention order repeatedly. Defendants and their lawyers are not shown the alleged evidence against them.

An Israeli military judge rejected an appeal by Adnan last week, saying he reviewed the evidence and found the sentence to be fair.

On Saturday, European Union foreign policy chief Catherine Ashton said the bloc was following Adnan's case with "great concern."

"Detainees have the right to be informed about the charges underlying any detention and be subject to a fair trial," Ashton said in a statement.

Israeli military officials generally use administrative detention to hold Palestinians who they believe are an imminent risk to the country's security. They say if the evidence against the accused was made public, it would expose Israeli intelligence-gathering networks in the Palestinian Territories. They say the process is under full judicial review by Israel's military and the Supreme Court.

Annan began his hunger strike on Dec. 18, a day after he was seized from his home in the northern West Bank town of Arabeh.

He told his lawyers that he was beaten and humiliated during arrest and interrogation.