Prime Minister Kassim Majaliwa made the comments to the state broadcaster as he led hundreds of mourners in an emotional ceremony for the slain peacekeepers in the commercial hub, Dar es Salaam.
The event was attended by the UN's top peacekeeping official, Jean-Pierre Lacroix.
Majaliwa says Tanzanians want to know what exactly happened and "we want legal actions against all those involved."
The December 7 attack was the deadliest single assault on a UN peacekeeping mission in nearly 25 years. One of dozens of rebel groups in the region is suspected in the hours-long attack that also wounded more than 40 peacekeepers.
Disclaimer: No Business Standard Journalist was involved in creation of this content