Aziz Dweik (L) was greeted by supporters after his release two months ahead of schedule
Israel has released Hamas parliamentary Speaker Aziz Dweik two months before the end of a three-year jail sentence.
Mr Dweik and other Hamas politicians were detained in the West Bank in 2006. He was charged with belonging to an illegal organisation.
His detention followed Hamas's capture of Israeli soldier Gilad Shalit in a cross-border raid.
Hundreds of Israelis are protesting at goods crossings into the Gaza Strip, calling for Sgt Shalit's release.
Demonstrators marked the three-year anniversary of Sgt Shalit's capture by blockading two crossings, Karni and Kerem Shalom, on Tuesday morning.
But attempts to halt lorries carrying supplies into the Gaza strip were stopped by Israeli police.
At the same time, inside Gaza, demonstrators called for the release of the thousands of Palestinians incarcerated in Israel.
Sgt Shalit was captured by Palestinian militants, including some from Hamas's armed wing. Two other soldiers and two militants were killed in the same raid.
Mr Dweik - also known as Abu Hashem - became the Speaker of the Palestinian parliament in January 2006, after Hamas won Palestinian Authority elections.
He was arrested at his house in the West Bank city of Ramallah in August 2006, two months after Israeli troops also detained 20 Hamas MPs in response to the capture of Sgt Shalit.
Aziz Dweik's sentence was due to end in August
Mr Dweik, 60, was released from Hadarim prison near Tel Aviv, then transferred to a military check-point outside the city of Tulkarm in the north of the occupied West Bank.
"Any person deprived of his freedom feels an enormous hardship," he told the French news agency AFP.
His release comes after a military tribunal near Ramallah rejected an application by prosecutors to keep Mr Dweik behind bars when his sentence ended.
The BBC's Middle East correspondent Paul Wood said the Israeli military had presumably wanted to keep Mr Dweik in jail because holding such a senior Hamas politician would have been useful in the ongoing negotiations for the release of Sgt Shalit.
But Mr Dweik had been in bad health and has now been freed two months before the end of his sentence.
Earlier, his wife told a Palestinian news agency that she was surprised by the decision to release him but hoped other Palestinian prisoners would also now be freed.
Egypt has been brokering indirect talks between Israel and Hamas, in the hope of securing the release of Sgt Shalit - who has been promoted from the rank of corporal since his capture.
Hamas had demanded the release of more than 400 of the thousands of Palestinian prisoners held by Israel.
Among them are senior militants who have been involved in deadly attacks on Israeli civilians.
Talks under outgoing Israel Prime Minister Ehud Olmert broke down in March 2009.
Israel increased restrictions on Gaza in the wake of Sgt Shalit's capture, and further tightened the blockade in June 2007 when Hamas seized full control of the coastal Strip.
Hundreds of Palestinians remain in Israeli jails for Hamas membership - including 30 members of the Palestinian Legislative Council.
Egypt is also seeking to end a deep split between Hamas and the Palestinian Fatah faction, which dominates the West Bank-based Palestinian Authority.