Stephane Dujarric, the UN's chief spokesman, said on Tuesday: "While recognising Israel's right to defend its citizens, targeted killings place innocent bystanders at grave risk and amount to executions without trial."
Annan called on both Israelis and Palestinians to do everything possible to protect civilians and refrain from any actions that could escalate the violence, Dujarric said.
Israel killed two fighters in a missile strike on a car in Gaza on Tuesday, bringing to 10 the number of Palestinians killed in a wave of attacks as the Hamas geared up to form a government after winning a Palestinian election and Israel prepared for its own 28 March balloting.
A recent wave of Israeli attacks
has killed 10 Palestinian fighters
The dead, Mohammed Abu Sharia and Suhail Baker of the al-Aqsa Martyrs Brigades in Gaza, had been involved in rocket attacks targeting Israel, an Israeli military spokesman said.
The surge in violence came as Hamas officials held talks in Egypt on forming a new Palestinian government after the group defeated Mahmoud Abbas, the Palestinian president's Fatah faction in a 25 January election.
Ismail Haniyeh, a Hamas leader, told Reuters in Cairo that a member of his group was expected to become the new Palestinian prime minister although it was too soon to talk about names.
Hamas is sworn to Israel's destruction and the UN Security Council said last week that all members of a future Palestinian government had to disarm and recognise Israel's right to exist for the Middle East peace process to go on with international help.