The ruling African National Congress (ANC) used its voting power to muscle through the controversial Protection of State Information Bill in the National Assembly.
Because opposition parties had called for a division, MPs had to vote individually through an electronic system and not along party lines.
The result of Tuesday's vote was 229 MPs voted in favour of the bill, 136 voted against it and two MPs abstained.
Just before the vote ANC MP Llewellyn Landers, a former minister in the apartheid government of President PW Botha said the new draft law was aimed at replacing the Information Act that was promulgated in 1982, which had the original aim of suppressing information about the state.
Landers also said that the bill would give closure to anti-apartheid activists who were murdered during that time, although he did not make it clear how it would be done.