The Nigerian, who has not been identified, was arrested in November last year when the Danish frigate Esbern Snare was patrolling international waters off Nigeria to protect merchant ships.
Its sailors attempted to board a suspected pirate vessel from a helicopter and a firefight ensued.
The suspect received leg injuries and was brought to Denmark to receive medical care, the first time the Scandinavian country has transferred a piracy suspect to its territory.
He was put on trial after needing a leg ampution and had faced up to one and a half years in prison, but prosecutors did not charge him with piracy.
Three other suspects were detained after the fight but later released. Four others were killed and a fifth fell overboard, the Danish authorities said.
The prosecution did not accuse the defendant of firing on the Danish sailors but argued that as a member of the suspected pirate gang, he had “caused imminent danger to the lives of the Danish helicopter crew”.
Defence lawyer Jesper Storm Thygesen argued that his client should be acquitted because the Danish navy had fired first.
The court found the man guilty but ruled against handing down any punishment because of his health and his suspected accomplices had been released.
The individual will remain in custody until at least December 20th when the
deadline for appeal expires.
The Gulf of Guinea, which stretches 5,700 kilometres from Senegal to Angola, has been a troubled area for shipping companies.
In 2020, there were 115 skirmishes in the region, according to the Maritime Information Cooperation and Awareness Center.
That fell to 52 in 2021 and to 20 since the start of 2022.