(CNN) -- The execution of three men in Gaza Tuesday brings to five the number of people who have been put to death by the ruling Hamas government.
The convicted men were guilty of murder, the Gaza interior ministry said, without providing their names or details of the crimes.
The interior ministry's statement said the defendants had legal representation and the chance to defend themselves in open court.
The executions were a necessary form of punishment, fit the crimes and will serve as a deterrent, the statement said.
Last month, the government executed two Palestinian men for allegedly collaborating with Israel.
They were believed to be the first judicial executions in Gaza since 2005, when Fatah dominated the Palestinian Authority.
Hamas seized power from the Palestinian Authority in Gaza in 2007.
After the April executions, Dr. Hassan al-Ouri -- a legal adviser to Palestinian Authority President Mahmoud Abbas -- called them illegitimate, citing Palestinian laws that require death sentences to be ratified by the president.
Al-Ouri said that Abbas had not given his approval for any executions while serving as president, instead changing court sentences to life in prison or other lesser sentences.