JERUSALEM -- Thousands of outraged Palestinians took to the streets of the West Bank on Thursday, joining funeral processions and demonstrations after two protesters were killed by Israeli troops and a Palestinian prisoner died of cancer in Israeli custody.

The unrest clouded an upcoming visit by U.S. Secretary of State John Kerry and underscored the difficult task he faces as he tries to restart peace talks in the coming months.

The demonstrations were among the largest in the West Bank in months, and came amid rising violence. But officials on both sides urged calm, and by nightfall, the situation appeared to be quieting down.

Israeli troops had been on heightened alert since Maysara Abu Hamdiyeh, a 64-year-old prisoner, died Tuesday from throat cancer. The Palestinians have blamed Israel for not giving him proper treatment.

Tensions rose further Wednesday when two Palestinian youths were killed in the northern West Bank after throwing firebombs toward Israeli troops. In an apparent show of solidarity with Abu Hamdiyeh, militants in the Gaza Strip fired rockets into Israel for three straight days, drawing Israeli retaliation, in the greatest challenge yet to a cease-fire reached in November.

Palestinian President Mahmoud Abbas said Israel was responsible for the violence, claiming it was trying to divert attention from a four-year standstill in peace efforts.

"It seems that Israel wants to spark chaos in the Palestinian territories," he said. "From the beginning, we have said we want stability and calm. Despite that, Israel on every occasion is using lethal force against peaceful young protesters, and peaceful demonstrations are being suppressed with the power of weapons. This is not acceptable at all."

In the most serious unrest, thousands of people took part in a funeral procession for Abu Hamdiyeh in Hebron.

The issue of Palestinian prisoners is deeply emotional in Palestinian society. Nearly every Palestinian family has a member or close acquaintance who has spent time in an Israeli prison, and the 4,500 Palestinians being held by Israel are seen as heroes standing up to Israeli occupation. Israel says the prisoners are criminals and terrorists. Abu Hamdiyeh had been serving a life sentence for involvement in an attempt to carry out a suicide bombing in a crowded Jerusalem restaurant a decade ago.

Mourners carried Abu Hamdiyeh's body through the streets of the town, while chanting anti-Israel slogans and burning U.S. flags. Masked gunmen fired into the air, while Abu Hamdiyeh was given a full military burial.

Several hundred people later clashed with Israeli troops, hurling stones and firebombs toward forces who responded with tear gas and rubber-coated bullets to disperse the crowd. Several people were taken away in ambulances, but no serious casualties were reported.

In the northern West Bank, hundreds of people turned out for funeral processions for the two youths, aged 17 and 19, who were killed late Wednesday. The Israeli army said it opened fire after a military checkpoint was attacked with firebombs. The funeral march remained peaceful, in part because of Palestinian security forces standing nearby.

Smaller clashes were reported at several locations elsewhere in the West Bank, but the unrest appeared to be quickly contained.

While Israeli officials frequently express concern of a new Palestinian uprising starting, both sides have an interest in keeping things under control.

Israel clearly does not want a return to the days of the uprising a decade ago, when Palestinian suicide bombers frequently attacked major cities. Israel also has come under increasing international criticism for its settlement policies in the West Bank and faces pressure to improve conditions for Palestinians under its control at a time when peace efforts are not moving. A heavy military crackdown could draw additional criticism.

The Palestinians suffered heavy casualties and damage in the previous bout of fighting and seem to have little desire for renewed hostilities. They are eager to capitalize on the international anger toward Israeli settlements and could see this support dissipate if major violence and attacks on Israeli targets were to resume.

"The Palestinians have an interest in controlling the violence, and that is a mutual interest that we have so we don't see it spinning beyond that," said Maj. Peter Lerner, an Israeli military spokesman. Nonetheless, he said the Palestinians were playing a "very dangerous game."

"You know where you begin with this violence. You don't know where it ends and that, for us, is a red light, something that we have to follow very closely," he said.

With Kerry expected in the region Sunday, the Palestinians accused Israel of undermining the visit. He plans to meet with both sides in search of a formula to restart peace talks. U.S. officials have said he will largely be listening to each side for fresh ideas on how to break four years of deadlock. A breakthrough may be tough to achieve, partly because hard-line West Bank settlers hold key positions in Israel's new government, and many of them resist granting concessions to the Palestinians.

"The Israeli government is responsible for the escalation and its dangerous consequences on the American efforts that aim to resume negotiations," said Nabil Abu Rdeneh, a spokesman for Abbas.

Abbas has refused to negotiate while Israel continues to build settlements in the West Bank and east Jerusalem, which the Palestinians claim for a future state. He says the settlements, now home to more than 500,000 Israelis, make it ever more difficult to partition the land and that continued construction is a sign of bad faith.

Israel, which captured the areas in the 1967 Mideast war, has refused to halt settlement construction and says negotiations should begin without any preconditions.

Abbas governs in the West Bank, while the rival Hamas movement controls the Gaza Strip. Abbas hopes to establish an independent state in the West Bank, east Jerusalem and Gaza. Hamas' rule over Gaza, seized from Abbas' forces six years ago, is a major complicating factor since the Islamic militant group opposes peace with Israel.

Early Thursday, Gaza militants fired rockets toward Israel for a third straight day. The rockets, and an Israeli airstrike Wednesday, have strained a cease-fire brokered by Egypt in November after eight days of heavy fighting. Israeli leaders have warned that their patience is growing thin and threatened tougher retaliation if the rocket fire continues.

Hamas, which has close ideological ties with Egypt's Islamic rulers, also has an interest in keeping things quiet. The group has been working to halt the rocket fire, which is believed to have been carried out by radical, al-Qaida-inspired groups that oppose any accommodation with Israel.

Even so, the Israeli military said Thursday it had moved a battery of its new Iron Dome rocket-defence system to the southern resort town of Eilat.

Eilat is located near Egypt's Sinai Desert, where al-Qaida-linked groups have staged attacks against Israel.