Lagos , Nigeria ( CNN ) -- Nigerian gunmen on Sunday released 12 sailors who ship was attacked two days earlier off the country 's coast , a spokesman for the Nigerian military said . Pirates had boarded a German-flagged ship off the coast of Nigeria on Friday night and took the foreigners hostage , the country 's military said . The attack took place about four nautical miles off Bonny Island , said Lt. Col. Timothy Antigha of the military Joint Task Force ( JTF ) in the Niger Delta . He did n't release any details on the pirates , only saying they are `` criminals . '' One sailor was wounded in the attack and left on the boat , he said . The kidnappers later abandoned the ship and it was retrieved by the Nigerian navy . The freed sailors were on their way to Bonny Island , where their ship is currently anchored off the coast of the southern Nigerian state of Rivers . Earlier , Antigha had said he did not know the nationalities of the abducted sailors or whether the pirates had demanded a ransom .
NEW : Gunmen release their 12 hostages . Attack on German-flagged ship takes place Friday off Bonny Island . One sailor is wounded in the attack . Pirates had abandoned ship .