The human rights group Amnesty International charged Wednesday that Hamas, the Palestinian Islamist militant organization that controls the Gaza Strip, used the cover of last summer’s war with Israel to carry out abductions, torture and ­extrajudicial executions with impunity.

The 50-day war left swaths of Gaza in ruins and thousands dead.

In a report, Amnesty International said the killing of Palestinians alleged to have collaborated with Israel constituted war crimes. The group also extended blame beyond Hamas to include the West Bank-based Palestinian Authority, saying it failed to stop or investigate the executions.

Also Wednesday, Israeli warplanes hit five targets in the Gaza Strip in response to rocket fire from the coastal enclave. No serious injuries on either side were reported.

Israeli Defense Minister Moshe Yaalon warned Hamas that Gaza “will pay a heavy price” if rocket fire from the territory escalates.

Israel and Hamas-affiliated ­social media sites reported that the rocket fire from Gaza late Tuesday, which landed near the seaside city of Ashdod in southern Israel, probably came from Islamic Jihad, a Gaza-based Palestinian militia.

“Hamas better restrain any attempts to open fire toward Israel or provoke it. Otherwise we will have to act more forcefully,” Yaalon said. “I wouldn’t advise anyone to test us.”

The Amnesty report describes Hamas forces targeting Palestinians suspected of assisting Israel and executing at least 23 people extrajudicially.

The report said that some of those killed during the war had been arrested months or even years earlier. Those formally charged with or convicted of collaborating with the enemy faced military courts and tribunals “whose proceedings are unfair and fail to respect due process,” the report said.

Six men among the 23 were paraded in front of a mosque in Gaza City after Friday prayers on Aug. 22, 2014. They were hooded and their hands bound behind them, and they were forced to their knees. As a crowd watched, an executioner fired a bullet into each man’s head. Each man was then shot in the torso with an AK-47 assault rifle.

The killers put signs on the bodies alleging that the men had “provided information to the enemy about the locations of guards, tunnels, explosive devices, and homes of fighters, which the occupation bombed and which resulted in many martyrs from resistance fighters.”

The Amnesty report also said security forces from Hamas’s ­Interior Ministry used an outpatient clinic at Shifa Hospital in Gaza City “to detain, interrogate, torture and otherwise ill-treat suspects, even as other parts of the hospital continued to function as a medical centre.”

This was the hospital where thousands of Palestinians wounded in Israeli attacks were treated during the war and where Hamas officials gave hourly media interviews condemning what they called Israeli aggression.

In briefings during and after the war, Israeli military commanders said Hamas was using patients and staff at the hospital as “human shields” to protect command-and-control centers from airstrikes.

Amnesty International also charged that “three men died in custody in suspicious circumstances just a few days after they were arrested and tortured.”

Amnesty said detainees were tortured — in a bid to induce “confessions” — with methods that included being “beaten with truncheons, gun butts, hoses, wire, and fists; some were also burnt with fire, hot metal or acid.”

Salah al-Bardawil, a spokesman for Hamas in Gaza City, called the report “unjust and unfair” and questioned Amnesty’s motivations, in part because the organization has “Israeli employees.”

The spokesman also deflected responsibility from Hamas to other Palestinian factions.

“The report focused on Hamas only because it is the biggest enemy of Israel,” he said.

In a statement, Hamas said it had “no connection with killings” documented in the Amnesty report. Instead, it accused Israel of recruiting collaborators, who Hamas suggested were prisoners who fled their cells when the facilities were attacked during the Gaza-Israel conflict. Hamas also said that families of Gaza residents killed in Israeli raids took part in “revenge killings.”

Amnesty International said it has not been able to send a delegation to the Gaza Strip since the war and, therefore, carried out its research “remotely, supported by a fieldworker based in Gaza.”

The Palestinian Authority and Hamas, meanwhile, continue their months-long standoff over administering civil and security affairs in the territory. Their failure to coordinate has led donor governments to withhold billions of dollars pledged to rebuild the war-ravaged strip.

Last week, a World Bank report said Gaza’s economy was on the brink of collapse. The report blamed the war, Egyptian and Israeli blockades on travel and trade, as well as bad governance by Hamas and the Palestinian Authority for surging unemployment and misery in the territory.

Balousha reported from Gaza City.

Read more:

Israel returns frozen funds to Palestinians

Separation wall cannot split church lands

Here’s what really happened in the Gaza war (according to the Israelis)