MPs in Mozambique have revised the country’s penal code to criminalise digital snooping.
Anyone who now gains access to phones, computers or other gadgets belonging to someone else without permission will face up to two years in prison.
For those who illegally produce, sell or distribute "non-public information" obtained from such devices without permission, the penalty will be a jail term of up to five years.
The law now also stipulates that offenders will also be fined at least the equivalent of one year’s minimum salary of about $816 (£676).
The revision aims to adapt criminal law to the realities of modern communication technologies to give individuals and businesses protection.
Less of than half of Mozambique’s 31 million inhabitants have mobile phones.