The Spanish frigate ESPS Navarra was called to the attack
The EU's naval force has freed six Somali pirate suspects, a day after they were captured trying to hijack a vessel off the East African coast.
Cmdr John Harbour said the men had to be released because the crew of the cargo vessel refused to give evidence.
The suspected pirates were allegedly part of a gang who attacked the Panamanian-flagged ship MV Almezaan.
Security guards on board the ship opened fire, killing one of the attackers before an EU warship arrived.
It is believed to be the first time that private security guards have killed a pirate in recent years.
It has sparked a debate about whether more ships should travel with guards.
Some say it might encourage pirates to use more violence, while others say it would help deter attacks.
Cmdr Harbour told the BBC that the case against the suspects captured on Tuesday was "clear-cut".
"We intercepted the pirates, we destroyed their mother-ship and we went on board the cargo ship to get statements," he said.
"But we had to release them because the master of the ship would not testify."
The guards who shot the pirate suspect were also likely to avoid any censure, with Cmdr Harbour saying nothing could be done without statements from those involved.
The EU force, known as Navfor, received a distress signal early on Tuesday from the MV Almezaan.
Navfor said members of an "armed private vessel-protection detachment" on board the ship had been involved in a fire-fight with pirates.
The EU force sent the Spanish warship Navarra to the area and found the pirate suspects trying to flee the area in two skiffs.
When a team from the Navarra boarded the vessels, they found three men in one skiff and three in the second, along with the body of a fourth man.
The authorities have struggled to find a solution to the problem of piracy - both stopping the attacks, and how to punish captured suspects.
War-wracked Somalia has no functioning central government and the chaos there has allowed the pirates to function with relative impunity.
The suspects are often sent to Kenya, where dozens are languishing in jails awaiting trial in a chronically overburdened legal system.
But there is no consensus on how to prosecute the suspects, and moves to set up an international tribunal have foundered.