A leading South African newspaper has blacked out several columns in its latest issue, echoing censorship of the apartheid era, after being threatened with criminal prosecution by a presidential aide.

The front page of South Africa's Mail & Guardian newspaper

The weekly Mail & Guardian was forced to pull a front page story about Mac Maharaj's possible involvement in a shady arms deal. Maharaj, a former Robben Island prisoner who helped smuggle out Nelson Mandela's autobiography, is now spokesman for president Jacob Zuma.

The newspaper said it received a legal letter from him just before its Thursday evening deadline, warning that its journalists could face prosecution, carrying up to 15 years in jail, if it published details of a police investigation into a mid-1990s arms deal that led to convictions of other government officials for bribery.

Maharaj's legal firm argued the paper had acquired documents unlawfully, citing an act that makes it an offence to disclose evidence gathered in camera.

"In the name of press freedom, the M&G arrogates to itself the 'right' to break the law that has been on our statute books since 1998," Maharaj claimed, accusing the paper of seeking "to hide its complicity in criminal acts by raising the spectre of a threat to media freedom and invoking fears of censorship".

Maharaj's letter warned of "the consequences the use of unlawfully and illegally obtained information had on a publication such as the News of the World."

The anti-apartheid stalwart did not make any comment about any involvement in the tainted arms deal. The 30bn rand (£2.4bn) contracts to buy European military equipment has been described as the "original sin" of South Africa's young democracy. Zuma himself was implicated but not convicted.

The Mail & Guardian is considering legal options. Its editor, Nic Dawes, tweeted a picture of the Weekly Mail newspaper from 1986 with some words blacked out by the apartheid regime. He then tweeted an image of Friday's Mail & Guardian front page headline: "Censored. We cannot bring you this story in full due to a threat of criminal prosecution."

Dawes said: "Comparisons with apartheid always make me uneasy because we live in a very different country now, but you can't get away from the awful resonance."

In an article on the Mail & Guardian's website, Dawes said Maharaj was attempting "to avoid answering to the South African public" over suspicious payments and his subsequent behaviour.

"He is now claiming in press statements and interviews that the Mail & Guardian obtained its information illegally, and comparing our conduct to that of journalists at the defunct British tabloid News of the World, who hacked into the phones of celebrities, and the murdered schoolgirl Milly Dowler."

Dawes said Maharaj needed to explain how he acquired a "hoard of offshore cash".

The dispute comes as South Africa's parliament debates a new law on state secrets that would see whistleblowers who divulge classified information, and journalists who publish such documents, facing possible imprisonment.

Critics said the penalties were draconian and the bill aimed at intimidating media outlets trying to expose corruption. The Mail & Guardian described Maharaj's intervention as a "chilling forewarning of what may happen if the protection of state information bill is adopted in its current form."

Veteran South African journalist Max du Preez tweeted: "Today's M&G makes me nostalgic about the 80s & angry that those who fought with us are now undoing the gains of that struggle."