As tensions rise following the US President’s move, Israel responded to three rockets being fired from Gaza with airstrikes it said targeted a Hamas training compound and ammunition warehouse.
The Palestinian Health Ministry said 25 people were wounded in the strikes, six of them children.
It comes after Mahmoud al Masri, 30, and 54-year-old Maher Atallahwas were killed in clashes with Israeli security forces.
A third man was in a “very critical” condition after being shot in the head, the ministry added.
The deaths are the first after protests began at the announcement on Wednesday that Mr Trump would move Israel’s US embassy to Jerusalem and his declaration that he recognises the city as Israel’s capital.
The Israeli military said in a statement that soldiers had “fired selectively at two main instigators” and confirmed hitting them.
It said 4,500 Palestinians had been involved in “violent riots at six locations along the border with the Gaza Strip”.
One of three rockets fired on Friday hit the town of Sderot, the army added, but did not comment on possible casualties.
Palestinians had declared Friday a “day of rage”, with protests in cities including Jerusalem, Ramallah and Gaza’s Khan Younis, where Mahmoud al Masri was killed and at least 40 others were wounded.
People at the no-man’s land by the border fence rolled burning tyres and threw stones, and were met with gunfire and tear gas from soldiers.
In the West Bank, Palestinian medics said dozens of demonstrators had been treated for tear gas inhalation and rubber bullet wounds, following sporadic clashes at Israeli checkpoints.