(Bloomberg) -- Zimbabwe’s parliament passed a law that prohibits citizens from criticizing the government, two months before it holds presidential elections.

Lawmakers approved the so-called Patriotic Bill on Wednesday, and sent it for approval by the Senate. Zimbabwe’s President Emmerson Mnangagwa is expected to sign the bill into law.

Zimbabwe is preparing for elections on Aug. 23 in which Mnangagwa, 80, will seek a second term in office. Since coming to power in 2017, he’s presided over a series of economic missteps that have spawned inflation of more than 800%, a collapse in the nation’s currency and the world’s highest interest rates.

The new law lists as an offense “willfully injuring the sovereignty and national interest of Zimbabwe” by citizens holding meetings inside and outside the country and calling for military intervention, overthrow of a constitutional government, economic sanctions and trade boycotts. The nation’s ruling party says it’s modeled on the US’s Logan Act, which prohibits private citizens from intervening in disputes between America and foreign governments.

Offenders in Zimbabwe who engage in “unpatriotic conduct” can have their citizenship revoked, be imprisoned for 20 years and even face the death penalty, though capital punishment hasn’t been administered in the country for the past two decades. Civil society groups said the bill will censure freedom of expression.

Once it becomes law, it will criminalize the participation of Zimbabweans in meetings held in other countries, according to Zimbabwe Lawyers for Human Rights. That will have the “chilling effect” of silencing Zimbabwean civil-society organizations’ international advocacy efforts to promote the protection of human-rights protection in Zimbabwe, it said.

--With assistance from Godfrey Marawanyika.

©2023 Bloomberg L.P.