Tens of thousands of Gazans gathered at the Israeli border on Saturday to mark a year since protests and clashes erupted there, testing a fragile truce only 10 days ahead of an Israeli general election.
Three Palestinians were killed by Israeli fire, one during an overnight demonstration and two 17-year-olds in clashes later Saturday, the health ministry in Gaza City said. Another 316 Gazans were wounded.
Earlier, another Palestinian was killed by Israeli fire in an overnight demonstration ahead of the main protest, the ministry said.
Egypt had sought to mediate between Israel and Gaza's Islamist rulers Hamas to rein in violence and avoid the sort of deadly response from the Israeli army that has accompanied past protests.
Clashes so far appeared limited, but warnings to stay far back from the heavily fortified fence that marks the border were not being heeded by all.
"We will move towards the borders even if we die," said Yusef Ziyada, 21, his face painted in the colours of the Palestinian flag.
"We are not leaving. We are returning to our land."
Dozens of Palestinians were seen approaching the border fence east of Jabalia in the northern Gaza Strip at around midday (0900 GMT) before retreating as Israeli troops fired tear gas.
The protesters threw stones at the Israeli soldiers and burnt tyres.
Further south, an Egyptian security delegation visited a protest site east of Gaza City. Hamas leader Ismail Haniya also visited the site.
The city's mosques used loudspeakers to call on people to attend, and buses shuttled protesters to sites in rainy weather.
Israel's army said most demonstrators were remaining away from the fence.
"Approximately 40,000 rioters and demonstrators are currently gathered in several locations along the Gaza Strip security fence," it said in a statement.
"The rioters are hurling rocks and setting tyres on fire. In addition, grenades and explosive devices have been hurled at the Gaza Strip security fence in a number of different incidents."
It said soldiers were "responding with riot dispersal means and are firing in accordance with standard operating procedures."
Israel's army had not commented on the death in the overnight demonstration, but late Friday said explosive devices were thrown at the fence "throughout the evening."
A tank "struck a Hamas military post in the northern Gaza Strip" in response, it said.
Senior Hamas official Bassem Naim called Saturday's protest "a very important message sent from Gaza today to all parties, mainly the Israelis and the international community".
"Gazans today are gathering here, thousands and thousands of people peacefully, to raise their voice against aggression and the imposed siege on Gaza," he told AFP.
Protesters were marking the first anniversary of often violent weekly demonstrations in which around 200 Palestinians and an Israeli soldier have been killed.
The anniversary comes only days after another severe flare-up of violence between Israel and Hamas. An Egyptian-brokered ceasefire restored calm.
The timing is especially sensitive for Israel, which holds a keenly contested general election on April 9 in which Prime Minister Benjamin Netanyahu faces a stiff challenge from centrist former military chief Benny Gantz.
He is widely seen as wanting to avoid a major escalation, but has at the same time faced political pressure over accusations of being soft on Hamas.
The demonstrators are calling for Palestinians to be allowed to return to land their families fled or were expelled from during the 1948 war that accompanied Israel's creation.
Israel says any such mass return would spell the end of a Jewish state and that its actions have been necessary to defend the border.
It accuses Hamas of orchestrating violence, but its soldiers' use of live fire has come under heavy criticism.