Hundreds of other people, both local and foreigners, have been rescued from the town, next to gas projects worth $60 billion, Omar Saranga told journalists on Sunday.
"The defence and security forces registered the loss of seven lives of a group of citizens that left the Amarula hotel in a convoy that was ambushed by the terrorists," Saranga said.
A South African woman, Meryl Knox, told Reuters her son Adrian Nel had died in that ambush. Her husband and another son hid with his body in the bush until the following morning, when they were able to make it to safety in Pemba. A British contractor had also been killed, Britain's Times newspaper said.
The province of Cabo Delgado, where the town is located, has since 2017 been the target of a simmering Islamist insurgency linked to Islamic State.
Hundreds of people fleeing the attack are arriving by boat in the port city of Pemba, a diplomat and an aid worker said.
Saranga said the security forces were seeking to "eliminate some pockets of resistance" after spending the past three days focusing mainly on rescuing local and foreign citizens. It has not specified the name of the group and there has been no claim of responsibility.
"On March 24, a group of terrorists penetrated... the headquarters of Palma village and unleashed actions that culminated with the assassination of dozens of defenceless people," he said in the most specific information yet on the number of casualties in an area where communications are poor.
Militants struck Palma, a logistics hub for international gas projects worth $60 billion, on Wednesday. The government has yet to re-establish control, the diplomat and a security source directly involved in the operations to secure Palma said.
Reuters could not independently verify the accounts, as most communications with Palma were cut on Wednesday.
Calls to officials at the foreign ministry and provincial government went unanswered or did not go through on Sunday.
The boats arriving in Pemba on Sunday carried both locals and foreigners, including employees from the gas projects, the aid official and diplomat said. One boat was carrying around 1,300 people, said the diplomat.
French energy group Total said on Saturday it was calling off a planned resumption of construction at its $20 billion development following the attack and would reduce its workforce to a "strict minimum".
The company pulled out the majority of its workforce in January due to security issues.
Witnesses have described bodies in the streets of Palma, some of them beheaded. On Friday, militants ambushed a convoy of people, including foreign workers, attempting to escape a hotel.
Government-contracted helicopters were searching for more survivors on Sunday. Lionel Dyck, who runs a private security firm working with the government, said his helicopters had rescued some 120 people overall.
The exact number of people injured and killed in the four-day assault on Palma, or still unaccounted for, remained unclear. The town had previously been a refuge for people fleeing violence elsewhere in the province.