Hamas authorities executed five Palestinians on Sunday morning, two of them for helping Israel, Gaza's Interior Ministry said.

The dawn executions in Gaza were the first in Palestinian territories since 2017, Reuters reported. The five unidentified men were killed by either hanging or firing squad.

The ministry said two convicted spies, aged 44 and 54, assisted Israel by giving them information that resulted in the deaths of two Palestinians. This information could not be independently confirmed.

The city of Hamas

General view of Gaza city May 29, 2022.  (REUTERS/Mohammed Salem/File Photo)

"This morning, the Ministry of Interior and National Security carried out death sentences against five convicts in security and criminal cases, two of them were convicted of collaborating with the occupation, and three others were convicted of murder on a criminal background," the ministry said.

UKRAINE'S ZELENSKYY SAYS HE'S 'COUNTING' ON ISRAEL TO SANCTION RUSSIA, JERUSALEM REMAINS QUIET ON PENALTIES

The ministry said the espionage charges dated back to 2015 and 2009, Reuters reported.

It added: "The Ministry of Interior and National Security will continue to carry out its responsibilities and duty to enforce the law in order to maintain and protect security and community peace."

Military members of Hamas

Masked members of the al-Qassam Brigades, the military wing of Hamas, in the central Gaza strip, on August 8, 2022.   (Majdi Fathi/NurPhoto via Getty Images)

The ministry did not provide information about the alleged attack that resulted in the deaths of the two Palestinians. The executions were condemned by human rights groups.

Hamas, an internationally recognized terror group, has controlled the Gaza Strip since 2007.

CLICK HERE TO GET THE FOX NEWS APP

A photo of two Hamas soldiers

Masked members of the al-Qassam Brigades, during a funeral at al-Bureij refugee camp in the central Gaza strip, on August 8, 2022.   (Majdi Fathi/NurPhoto via Getty Images)

The U.S. initially designated Hamas as a foreign terrorist organization in 1997, as its terrorist activity threatens "the security of U.S. nationals or the national security (national defense, foreign relations, or the economic interests) of the United States," according to the State Department.