JERUSALEM — President Mahmoud Abbas of the Palestinian Authority embraced reconciliation with the Islamist movement Hamas on Monday, agreeing to head a unity government to prepare for elections in the West Bank and Gaza.

His move was welcomed cautiously by a broad range of Palestinians who are fed up with the brutal split at the heart of their national movement. It promised to upend Israeli-Palestinian relations, with Prime Minister Benjamin Netanyahu warning Mr. Abbas that he could have peace with Israel or unity with Hamas, but not both.

The agreement between Mr. Abbas, the leader of Fatah, and Khaled Meshal, the head of Hamas, was yet another convulsion in the Middle East involving the rise of political Islam and the challenge it poses to pro-Western forces. It put Israel, which is nervously watching the new order taking shape around it, further on edge.

“Hamas is an enemy of peace,” Mr. Netanyahu said. “It’s an Iranian-backed terror organization committed to Israel’s destruction.”