In an oration delivered just two days after a court relaxed a bail restriction preventing him from making political speeches, antiapartheid theologian Allan Boesak suggested tonight that the government had restricted media reporting of violence in segregated townships so it could commit acts of "subtle genocide" against blacks.

It was Boesak's first public speech since his detention under South Africa's security laws last August, and he delivered it a few hours after police and troops had sealed off several blocks to keep crowds of blacks and mixed-race people away from a Cape Town courthouse where Boesak and 17 others appeared on a civil disobedience charge.

Addressing an audience of about 2,000 in a church in this Colored, or mixed-race, township outside Cape Town, Boesak charged that the government had restricted media reporting "so that they can kill us in peace."

"State President Pieter W. Botha must answer whether the purpose of keeping reporters out of the townships is so that our children can be murdered in circumstances where there will be no witnesses and no record," Boesak said.

The bitterness of Boesak's charges tonight reflected a growing anger in the nonwhite community. He also seemed to be challenging the authorities with a display of increased militancy following tough action that has been taken against him.

"Whenever these people do something to you, don't take it lying down," he said.

Boesak was detained without charges in August when he tried to lead a protest march on Cape Town's Pollsmoor Prison to demand the release of African National Congress leader Nelson Mandela, who has been serving a life sentence there for 23 years.

Boesak was charged last month with subversion and released on $8,000 bail, combined with other stringent conditions that included withdrawing his passport, prohibiting him from addressing gatherings and confining him to the Colored township of South Belville where he lives.

On Monday Boesak won a court order relaxing some of these restrictions, including the one preventing him from making speeches. The court also ordered that his passport be returned, but the government immediately withdrew it again by executive order.

He held his largely mixed-race audience spellbound tonight as he preached a sermon from the Book of Revelations, suggesting that the day when "God will revenge the death of his children" was not yet at hand but was drawing closer.

Yesterday, two blacks were shot dead and a third was wounded when a crowd of about 700 who had attended the funeral of a victim of the violence attacked a police patrol in Cape Town's Guguletu township.

Police reported that a Colored soldier who had hitchhiked a lift was killed today and his body was dumped in Mitchell's Plain township near here.