Both sides said the assault was premeditated with the aim of covering up atrocities.
Russia claimed that Ukraine’s military used US-supplied rocket launchers to strike the prison in Olenivka, a settlement controlled by the Moscow-backed Donetsk People’s Republic.
Separatist authorities and Russian officials said the attack killed 53 Ukrainian POWs and wounded another 75.
Moscow opened a probe into the attack, sending a team to the site from Russia’s Investigative Committee, the country’s main criminal investigation agency.
The state RIA Novosti agency reported that fragments of US-supplied precision High Mobility Artillery Rocket System rockets were found at the site.
The Ukrainian military denied making any rocket or artillery strikes in Olenivka, and it accused the Russians of shelling the prison to cover up the alleged torture and execution of Ukrainians there.
An adviser to Ukrainian President Volodymyr Zelenskyy described the shelling as “a deliberate, cynical, calculated mass murder of Ukrainian prisoners.”
Neither claim could be independently verified.
Video shot by The Associated Press showed charred, twisted bed frames in the wrecked barracks, as well as burned bodies and metal sheets hanging from the destroyed roof.
The footage also included bodies lined up on the ground next to a barbed-wire fence and an array of what was claimed to be metal rocket fragments on a wooden bench.
Denis Pushilin, the leader of the internationally unrecognised Donetsk republic, said the prison held 193 inmates. He did not specify how many were Ukrainian POWs.
The deputy commander of the Donetsk separatist forces, Eduard Basurin, suggested that Ukraine decided to strike the prison to prevent captives from revealing key military information.
Ukraine “knew exactly where they were being held and in what place,” he said.
“After the Ukrainian prisoners of war began to talk about the crimes they committed, and orders they received from Kyiv, a decision was made by the political leadership of Ukraine: carry out a strike here.”
Ukrainian presidential adviser Mykhailo Podolyak called for a “strict investigation” into the attack and urged the United Nations and other international organisations to condemn it.
He said the Russians had transferred some Ukrainian prisoners to the barracks just a few days before the strike, suggesting that it was planned.
“The purpose — to discredit Ukraine in front of our partners and disrupt weapons supply,” he tweeted.
Ukrainian officials alleged that Russia’s Wagner Group, mercenaries Russia has used in other armed conflicts and reportedly elsewhere in Ukraine, carried out the assault.
Ukraine’s security agencies issued a statement citing evidence that Russia was responsible, including the transfer of prisoners, analysis of injuries and the blast wave, intercepted phone conversations and the absence of shelling at the site.
“All this leaves no doubt: The explosion in Olenivka was a Russian terrorist act and a gross violation of international agreements,” the statement said.
A Russian Defense Ministry spokesperson, Lieutenant General Igor Konashenkov, described the strike as a “bloody provocation” aimed at discouraging Ukrainian soldiers from surrendering.
He too claimed that US-supplied HIMARS rockets were used, and said eight guards were among the wounded.
Ukrainian forces are fighting to hold on to the remaining territory under their control in Donetsk. Together with the neighbouring Luhansk province, they make up Ukraine’s mostly Russian-speaking industrial Donbas region.
For several months, Moscow has focused on trying to seize parts of the Donbas not already held by the separatists.
Holding POWs in an area with active fighting appeared to defy the Geneva Convention, which requires that prisoners be evacuated as soon as possible after capture to camps away from combat zones.
The Ukrainian POWS at the Donetsk prison included troops captured during the fall of Mariupol. They spent months holed up with civilians at a giant steel mill in the southern port city. Their resistance during a relentless Russian bombardment became a symbol of Ukrainian defiance against Russia’s aggression.
More than 2400 soldiers from the Azov Regiment of the Ukrainian national guard and other military units gave up their fight and surrendered under orders from Ukraine’s military in May.
Scores of Ukrainian soldiers have been taken to prisons in Russian-controlled areas. Some have returned to Ukraine as part of prisoner exchanges with Russia, but the families of other POWs have no idea whether their loved ones are still alive, or if they will ever come home.