Mr. Khaas was one of thousands of young Palestinians who charged the fence in waves, engaged in what seemed a logic-defying game of chicken with the highly armed Israeli soldiers arrayed on the other side of the fence.

Both sides were driven by history and politics in one of the world’s most intractable conflicts.

Many of the Gaza protesters were furious at the Trump administration’s decision to move the United States Embassy in Israel from Tel Aviv to Jerusalem, the disputed holy city, with a ceremony that took place on Monday barely 40 miles away.

The protests also were timed to the eve of the 70th anniversary of what the Palestinians call the Nakba, or catastrophe, on May 15, 1948, when hundreds of thousands were fled or forced from their homes in what is now Israel.

For many of the young protesters flinging themselves at the fence, with such little real hope of getting through, it also seemed an act of desperation over the circumstances of their impoverished, isolated lives in a territory that they call a virtual prison camp since Israel imposed a blockade 11 years ago.