After a more than four-month surge in confrontations, Israel this week eased its clampdown on the Gaza Strip border and fishing waters. Cairo said it was finalizing the details of a longer-term accommodation between Israel and the dominant Palestinian Islamist group Hamas.
Some 20,000 people took part in Friday's protests, which took place a few hundred meters from the fence, though dozens came closer, with some rolling burning tyres, witnesses said.
Medics said Israeli gunfire killed two men and wounded at least 270 other Palestinians, 50 of them with live bullets.
An Israeli army spokeswoman said troops had responded with "riot-dispersal means" to prevent breaches of the border.
Friday's deaths brought to 170 the number of Palestinians killed by Israeli forces since the weekly protests began on March 30. The campaign is pressing for rights to land that Palestinians lost to Israel in the 1948 war of its foundation, and for an end to the Israeli-Egyptian blockade of Gaza.
Anger in Gaza has also been stoked by funding cuts by the Western-backed administration of Palestinian President Mahmoud Abbas, which dominates the West Bank and is the rival of Hamas, which runs Gaza. Their efforts at agreeing on a power-sharing unity deal with Egyptian mediation have not borne fruit.
Separately, Israeli police said they were attacked on Friday by a knife-wielding man after he emerged from the Jerusalem complex housing Al Aqsa mosque, Islam's third-holiest shrine, and shot him.
The police statement did not immediately give the man's condition. It described him as a resident of an Israeli Arab town where pro-Palestinian sympathies are strong.
(Reporting by Nidal al-Mughrabi; Writing by Dan Williams; Editing by Gareth Jones)