Seven were killed trying to escape a siege on a hotel, said Omar Saranga.
Hundreds of others, both locals and foreigners, were reportedly rescued.
The area has been under attack by Islamist militants since Wednesday. Witnesses have described hiding out while waiting to be rescued by boat, on a beach strewn with headless bodies.
Marine traffic websites showed a string of vessels around Palma, and the port of Pemba to the south, as people tried to escape by any means - cargo vessels, passenger ships, tugs and recreational boats.