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.