JUST before the signing of what could be a historic accord between rival black groups and the government in South Africa, township violence has broken out with renewed viciousness. The settings are vastly different, but there's an echo, nonetheless, of the Moscow coupmakers intent on taking action before a treaty redefining their country's politics could be implemented.In South Africa, too, some who cling to the past would like to turn back the clock. They'd like to thwart the reforms of President Frederik de Klerk and prevent the ascent to power of black political groups, such as the African National Congress, that they have long regarded as the enemy. On the other end of the spectrum are radicals who believe violence is their ticket to power. No one has positively identified the three gunmen who fired AK-47s at peaceful marchers from the Inkatha Freedom Party. The shooting touched off a spree of township violence, ending two months of relative calm. Nelson Mandela, ANC president, called the act "a deliberate provocation" aimed at undermining the peace meeting this Saturday. The pact to be signed this weekend is designed to end the clashes between ANC and Inkatha partisans, which have taken thousands of lives. The agreement will include standards of conduct for both political parties and the police. Mr. Mandela and Inkatha's Chief Mangosuthu Buthelezi have affirmed that this week's burst of killings won't deter them from the peace effort. Mandela has met with De Klerk to discuss the violence and means of stopping it. In the past, pleas for calm from leaders haven't been enough to quell violence, and some doubt that a formal accord will go much farther. But this accord will include the government as well as opposition parties. Mandela has said that if all sides honor the agreement, the killing should finally subside. The unanswered question is just who perpetrated this week's strategically timed violence, and why. Suspicion has to fall heavily on the increasingly desperate pro-apartheid far right wing, which has often been linked to some elements in the state security forces. That axis must be broken, and the pact could be an important tool for doing that. Reform in South Africa is just as unrelenting as in other parts of the world where unjust systems are being thrown off. The recent agreement on the return of exiles and the coming peace accord are signs that positive change continues despite those who would use violence to block it.