The scenes were barely 40 miles apart: in Gaza, a chaotic panorama of smoke, fleeing figures and tear gas on the deadliest day since mass protests at the border fence with Israel began; in Jerusalem, Ivanka Trump and other American officials celebrating President Trump’s formal relocation of the United States Embassy from Tel Aviv.

Israeli soldiers and snipers used barrages of tear gas as well as live gunfire to keep protesters from entering Israeli territory. By Monday evening, 52 Palestinians, including several teenagers, were dead and more than 2,400 were injured, the Health Ministry said.

The Israeli military said that some in the crowds were planting or hurling explosives, and that many were flying flaming kites into Israel.

American and Israeli officials celebrated President Trump’s move of the embassy to Jerusalem. Jared Kushner, Mr. Trump’s son-in-law, invoked a resolution to generations of conflict. “When there is peace in this region, we will look back upon this day and will remember that the journey to peace started with a strong America recognizing the truth,” he said.