The Hamas government executed two men in Gaza, saying they had provided information to Israeli military and assisted them with attacks on Hamas fighters.
Ahmed Atallah, the head of Gaza's military court, issued a statement on the Hamas interior ministry website, saying that the two were executed on Thursday for collaborating with Israel.
"They had been found guilty of collaborating for several years with the Zionist occupiers and of having as a result caused the death of several fighters," it said.
The two men were killed by firing squad before dawn, Samir Zakut, of the Palestinian human rights group Al-Mizan, said.
Al-Mizan condemned the executions and identified the executed men as Mohammed Ismail and Nasser Abu Freh.
The killings drew wide condemnations from human rights groups who criticised the Hamas military courts.
Amnesty International called the military proceedings unfair and said it was "gravely concerned" about the fate of other Palestinian prisoners held by Hamas.
It urged Hamas not to carry out several death sentences against Palestinians convicted of murder and of collaborating with Israel.
Mohammed Ismail, 36, was convicted of planting devices in the cars of fighters, presumably to help track them, Hamas officials said.
They said Nasser Abu Freh, 33, a former Palestinian police captain before Hamas took control, allegedly started receiving money to work with Israel in 1998.
A brother of one of the men said both families were summoned by Hamas police for a prison visit late Wednesday but were not told of the pending executions.
He said his family was briefly shown the body on Thursday before being informed that his brother had been buried in a Gaza cemetery.
Shin Bet, Israel's secret police, maintains a network of informers in the occupied West Bank, East Jerusalem and the Gaza Strip.
Collaborators are often recruited through blackmail, payment or the promise of entry and work permits to Israel.
The executions were the first in five years officially carried out in Gaza and the first since Hamas took control of Gaza in 2007.
Palestinian law allows the death penalty for those convicted of collaborating with Israel and other offences.
The law says the president must approve all execution orders before they can be carried out, but Hamas no longer recognises the legitimacy of Mahmoud Abbas, the Palestinian president, whose four-year term ended in 2009.
Since taking office in 2005, Abbas has signed such an order once, approving the execution of four convicted murderers in June 2005.
Hamas won elections in January 2006 but was shunned by the world powers, worsening a power struggle between the Palestinian factions.
Hamas currently controls the Gaza Strip, which it seized in 2007 after a series of clashes with Fatah security forces. Fatah, led by Abbas, is based in the West Bank.