The issue of prisoners held on each side of the Arab-Israeli divide is an emotive and high-profile one.
Some individuals have become household names and the subject of intense campaigns, military and political, for their release.
Two years of delicate negotiations prompted a major prisoner-exchange between Israel and the Lebanese Shia Islamist movement, Hezbollah, in July 2008.
The vast majority of remaining prisoners are Palestinians from the occupied territories, arrested in frequent raids by the Israeli army.
The Gaza Strip witnessed an intense wave of violence following the capture by Palestinian militants of Israeli Cpl Gilad Shalit, 21, on 25 June 2006. Cpl Shalit was seized in a raid on an Israeli army position at Kerem Shalom, near the eastern edge of the Gaza Strip.
Hezbollah handed over the bodies of Regev and Goldwasser in July 2008
He was the first Israeli soldier captured by Palestinian militants since 1994. Hamas, which seized Cpl Shalit in a joint operation with other groups, said it would consider releasing him as part of a prisoner exchange. His whereabouts remain unknown.
Reservists Ehud Goldwasser, 31, from the northern coastal town of Nahariya, and Eldad Regev, 26, from the town of Kiryat Motzkin, were captured by Hezbollah near the Israel-Lebanon border on 12 July 2006, prompting immediate Israeli military action.
On 16 July 2008, Hezbollah handed over the human remains of both men in a swap for several high-profile Lebanese prisoners held in Israeli jails - including Samir Qantar.
The swap caused controversy in Israel, with some ministers opposed to the idea of exchanging live Hezbollah prisoners for dead bodies. But Israel's government said it had a moral obligation to bring its soldiers home.
A number of other Israeli soldiers went missing in action in the 1980s and 1990s, but it is not known if any remain alive. The best-known case is that of Ron Arad, an airman captured by Shia militiamen after his plane crashed in Lebanon in 1986 and subsequently believed to have been transferred to Iran.
On 1 June 2008, Israel released Nissim Nasser, an Israeli citizen of Lebanese descent, who in 2002 had been convicted of spying for Hezbollah.
JULY 2008 PRISONER SWAP
From Hezbollah: Bodies of Israeli soldiers Ehud Goldwasser and Eldad Regev, and the remains of Israeli soldiers killed in south Lebanon in 2006
From Israel: Five Lebanese prisoners, including Samir Qantar, and the remains of some 200 Lebanese and Palestinian fighters
Hezbollah responded to the release by handing over a box reportedly containing the remains of Israeli soldiers killed during the 2006 war.
The exchange sparked rumours of wider, two-year long prisoner swap negotiations being facilitated by German mediators.
These rumours were confirmed when Israel handed over five Lebanese prisoners and the bodies of 200 Lebanese and Palestinian fighters in return for the bodies of Goldwasser and Regev.
The swap was mediated by the International Committee of the Red Cross (ICRC).
Lebanon declared a national holiday to mark the swap, which Hezbollah claimed was a major victory. After a major prisoner swap in early 2004 - in which more than 400 prisoners were released to Hezbollah in exchange for a reservist colonel and the bodies of three Israeli soldiers - the July 2008 exchange left no Hezbollah militants in Israeli jails.
Chief among those released was Samir Qantar, who had been serving several life sentences for murder after attacking a civilian apartment block in Nahariya in 1979.
Qantar (third left) was the most controversial figure in the 2008 swap
A policeman, another man and his four-year-old daughter were killed. A baby girl was accidentally smothered by her mother as she hid in a cupboard.
Hezbollah leader Sheikh Hassan Nasrallah had frequently called for Qantar's release, threatening to derail the 2004 deal when he was excluded from the list of prisoners.
Although Israel is also thought to be holding 25 Lebanese citizens of Palestinian origin - many for conventional criminal offences - their release is not understood to be at the heart of the dispute with Hezbollah.
Since the first Palestinian uprising began in 1987, the vast majority of security prisoners held in Israel have been Palestinians.
According to official figures supplied to the Israeli human rights organisation B'Tselem, by the end of February 2008, more than 8,400 Palestinians are being held by civilian and military authorities.
PALESTINIANS IN ISRAELI JAILS
8,400 prisoners in total
Detained until end of legal process: 2,167
Serving sentences: 5,148
Administrative detainees (Detained without trial): 788
(Source: B'Tselem, February 2008)
Of those, 5,148 are serving sentences, while there are 2,167 facing legal proceedings for alleged security offences, B'Tselem says.
Some 790 are being held under "administrative detention", without charge and often without knowledge of the suspicions against them, and 360 are described as detainees.
The Israel Prisons Service is now in charge of the installations where almost all Palestinian prisoners are held.
Until 2006, the large detention centre at Ofer in the West Bank, as well as Megiddo Prison and Ketziot Prison in Israel, were under the control of the Israeli army.
Figures collated by Palestinians vary slightly from the Israeli tallies, but only slightly. Such small differences are as close as the two sides come to agreement on the issue of prisoners.
While Palestinian officials call their detainees "political prisoners", often held as bargaining chips by Israel.
Jailed Palestinian leaders often wield considerable influence
Israel says that some 70% of those behind bars have "blood on their hands", in other words are responsible for lethal attacks on Israelis.
Palestinian officials also criticise the conditions inside Israeli prisons, describing them as "far below minimum standards"; Israel's prison authority says its security prisoners receive the "highest level" of treatment.
The thousands of Palestinian prisoners play an important role in political life.
Senior figures from the various Palestinian factions, such as Fatah's Marwan Barghouti, wield considerable influence from their cells on rank and file members on the street.
The release of what Palestinians term "political prisoners" is a key demand of ordinary Palestinians and of their leaders.