Updated

South Africa's parliament has passed a bill designed to protect state secrets despite the concerns of some activists who fear it could undermine the country's young democracy.

Lawmakers in Cape Town passed the bill by a 189-74 vote, with one abstention, on Thursday. The bill now goes to President Jacob Zuma to be signed into law.

The bill provides for prison terms for those who disseminate classified information as well as those convicted of espionage. The government describes the measure as a balance between openness and national security.

Opponents worry that the bill could make whistleblowers, activists and journalists more vulnerable to prosecution if they expose cases of official corruption.

The bill was revised after a public outcry over its provisions several years ago.