JERUSALEM (Reuters) - Stone-throwing Palestinians clashed with Israeli soldiers in the Israeli-occupied West Bank and in the Gaza Strip during “Day of Rage” protests on Friday while diplomats tried to end more than three weeks of bloodshed.

A Palestinian protester uses a sling to hurl stones at Israeli troops during clashes near border between Israel and Central Gaza Strip October 23, 2015. REUTERS/Ibraheem Abu Mustafa

U.S. Secretary of State John Kerry said he was cautiously optimistic there was a way to defuse tensions after holding four hours of talks with Israeli Prime Minister Benjamin Netanyahu in Berlin on Thursday.

Israeli authorities also lifted restrictions on Friday that had banned men aged under 40 from using the flashpoint al-Aqsa mosque compound in Jerusalem’s walled Old City - a move seen as a bid to ease Muslim anger.

Police said Friday prayers there ended quietly. But in the West Bank and Gaza, Palestinian medical officials said 45 people were wounded by gunfire, including a 13-year-old critically injured near Ramallah and three photographers near the Gaza border.

The Israeli military said it was unaware that journalists had been hurt and that soldiers had fired warning shots in the air before firing on leading instigators trying to breach the Gaza security fence.

Earlier, a 16-year-old Palestinian stabbed and wounded an Israeli soldier in the West Bank, before being shot and wounded by other troops, the Israeli military said.

One of the worst waves of street violence in years was triggered in part by Palestinian anger over what they see as Jewish encroachment on the compound, Islam’s third holiest site and also revered by Jews as the location of two ancient temples.

Palestinians are also frustrated by the failure of numerous rounds of peace talks to secure them an independent state in East Jerusalem, the West Bank and Gaza, territories Israel captured in the 1967 Middle East war.

The last round of negotiations collapsed in 2014.

More than 50 Palestinians, half of them assailants, have been shot dead by Israelis at the scene of attacks or during protests in the West Bank and Gaza since Oct. 1. Nine Israelis have been stabbed or shot dead by Palestinians.

Stabbings and shootings mostly have been carried out by “lone wolf” attackers, many of them teenagers.

Palestinian factions, including the militant group Hamas and the Fatah movement of Western-backed President Mahmoud Abbas, had called for Day of Rage rallies after Friday prayers, though protests were less intense than in previous weeks.

“By the blood of their sons, Jerusalem and the West Bank will write the end of the occupation,” said Ismail Rudwan, an official from Hamas, which controls Gaza.

STATUS QUO

Kerry was expected to meet in Amman on Saturday with Abbas and Jordan’s King Abdullah, who has a role as a custodian of the Muslim sacred sites in Jerusalem.

One of Kerry’s goals is to reinforce the status quo at al-Aqsa under which non-Muslim prayer has long been banned there. Netanyahu says Israel has not changed the status quo and has no intention of doing so.

The Quartet of Middle East peace mediators, met in Vienna on Friday and urged Israeli and Palestinian leaders to tone down their rhetoric and calm tensions.

A statement after the meeting - attended by Kerry, Russian Foreign Minister Sergei Lavrov, EU foreign policy chief Federica Mogherini and the U.N. Middle East coordinator Nickolay Mladenov - called on Israel “to work together with Jordan to uphold the status quo at the holy sites in Jerusalem in both word and practice”.

An Israeli government source said Netanyahu told Kerry in their meeting that, to curb violence, Abbas and King Abdullah should publicly declare the status quo had not changed.

A spokesman for Netanyahu would not confirm the prime minister had made such a demand.

Palestinians are also fuming at what they see as excessive use of force by Israeli police and soldiers, with many attackers shot dead at the scene when they might have been detained.

One Israeli was killed by soldiers who mistook him for an attacker, and an Eritrean migrant was beaten and shot dead by a crowd of Israelis who thought he had taken part in a shooting.

Israeli rights group B’tselem on Friday distributed security camera footage that appeared to show Israeli soldiers kicking a Palestinian man and using a rifle to beat him while he was lying on a storage room floor, before dragging him outside.

The Israeli military said in response that the event was being examined and a preliminary inquiry showed the soldiers had acted in accordance to the army’s expected standards.

B’tselem said it occurred on Oct 6. in the West Bank, near where clashes between Palestinians and Israeli troops were taking place, and that the soldiers then arrested the man. The military described the clashes as a “violent riot”.