Foreign shareholding in private shipping agencies is limited to 40%.
"3. In this Act unless the context otherwise requires-[...]
“shipping agent” means a Corporation or a company engaged in providing shipping agency services for sea ports and inland waterways ports in accordance with this Act;
“shipping services” include shipping agency, clearing and forwarding agency, cargo consolidation and deconsolidation, ship tallying, gross mass verification and miscellaneous port services; and
[...]
PART IV - LICENSING OF PRIVATE SHIPPING AGENTS
13. -(1) Any person intending to carry out the business of shipping agency shall:-
(a) apply to the Director General on the prescribed form; and
(b) pay the application fees as may be prescribed in the regulations.
(2) A person shall be licensed as a shipping agent under this Part if that person:-
(a) is a citizen of Tanzania;
(b) is a company incorporated under the Companies Act in which more than sixty per cent of the share capital is held directly or indirectly by a citizen of Tanzania; 
(3) Notwithstanding the provisions of subsection (2), the Director General shall not issue a licence for shipping agency if the applicant is a ship owner, ship operator, charterer, dry port operator or clearing and forwarding agent.[...]" (Tanzania Shipping Agencies Act 2017)
Tanzania Shipping Agencies Act 2017
[<a href="https://www.tasac.go.tz/uploads/publications/sw1626341817-THE%20TANZANIA%20SHIPPING%20AGENCIES%20ACT,%20CAP.%20415.pdf">Act</a>]