Tens of thousands of Gazans have gathered at the Israeli border to mark a year since protests and clashes erupted there, but fears of mass bloodshed were averted after late Egyptian-led negotiations.

Four Palestinians were killed by Israeli fire, one during an overnight demonstration and three 17-year-olds in clashes today, the health ministry in Gaza City said.

Another 316 Gazans were wounded.

But fears of a repeat of similar protests and clashes to those that saw more than 60 Palestinians killed on 14 May, when the United States transferred its Israel embassy to Jerusalem, did not materialise.

Egypt tried to mediate between Israel and Gaza's Islamist rulers Hamas to rein in violence.

Hamas officials said on Friday an understanding had been reached that would see Israel ease its crippling blockade of Gaza in exchange for the protests remaining calm.

Tens of thousands gathered at five protest points along the frontier, but the vast majority stayed away from the border fence, AFP journalists said.

East of Gaza City, small groups of young men approached the fence and sought to break it multiple times but were forced back by Israeli tear gas and live fire.

The protesters threw stones at the Israeli soldiers.

An injured Palestinian is carried away during a protest at the Gaza border

An Egyptian security delegation visited the protest site east of Gaza City, as did Hamas leaders Ismail Haniya and Yahya Sinwar.

Israel's army said around 40,000 "rioters and demonstrators" had gathered in spots throughout the border.

It said grenades and explosive devices were hurled at troops, who responded "in accordance with standard operating procedures."

Protesters were marking the first anniversary of often violent weekly demonstrations in which around 200 Palestinians and an Israeli soldier have been killed.

In the run-up to the anniversary, Egypt, the long-time mediator between the parties, had shuffled back and forth seeking to avoid major bloodshed.

Senior Hamas official Bassem Naim called today’s protest "a very important message" that thousands had gathered "peacefully to raise their voice against aggression and the imposed siege on Gaza."

He confirmed that Egypt had made progress towards a deal that media reports said would see Israel allow more Qatari aid into the strip and ease some restrictions.

In exchange, Hamas would maintain calm at the border protests.

Khalil al-Hayya, another senior figure in the Islamist movement, said they were expecting to receive a timetable from Israel on Sunday.

There was no Israeli comment on the alleged agreement.

Israel holds a general election on 9 April 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 anniversary came only days after another severe flare-up of violence between Israel and Hamas, sparked by rare long-range rocket strike from Gaza. An Egyptian-brokered ceasefire restored calm.

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.

Last month, a UN probe said Israeli soldiers had intentionally fired on civilians in what could constitute war crimes.

Two million Palestinians live in Gaza, crammed between Israel, Egypt and the Mediterranean.

Analysts highlight desperate living conditions and lack of freedom of movement as driving forces behind the protests.

Israel, which has fought three wars with Hamas, has blockaded the enclave for more than a decade, and Egypt often closes Gaza's only other gateway to the outside world.

Hamas is considered a terrorist group by the United States, European Union and others.

Many protesters over the past year have remained far back from the fence and demonstrated peacefully, but others have approached in numbers and clashed with soldiers.

Small groups have attached incendiary devices to balloons to float them over the border in an attempt to set fire to nearby Israeli homes and farmland.