A CONTEST IS being waged for the credit in bringing about the recent release of a group of detainees in South Africa. President Reagan says his policy was responsible for the release of 11 people on Dec. 7. The demonstrators on Massachusetts Avenue say their pressure did it. The South African authorities insist they released the 11 out of the goodness of their hearts.

But wait a minute. It is well that some are released, but a civilized society would never have detained them in the first place. The ruling white minority has endowed itself with a vicious set of legal tools to control all political expression and much else not regulated by law in democratic societies. These tools include very tough preventive-detention laws that are administered with an arbitrariness to which the victims have no effective counter.

Five other detainees released on Dec. 7, moreover, were rearrested and charged the very same day with economic sabotage. They blew up a factory, you imagine? No. They organized a "stayaway" or strike. Black trade unions have been given a tentative lease on life in recent years, and apparently this is the way the white authorities mean to cut them back.

On Dec. 10, five more detainees were let free unconditionally. Six more were released and immediately charged anew with treason, a capital offense. Also charged with treason were two of the three men who emerged from the British consulate in Durban where they had fled 91 days earlier in order to escape detention; the third, an older man who had just completed a 20-year prison term, was allowed to go free. Members of this group had helped organize protests against the new white- drafted constitution -- protests based on the feebleness of the political rights offered Asians and people of mixed race and on the total absence of political rights offered blacks.

One understands why the rulers of South Africa would wish to focus the discussion on their own "magnanimity." On the American side, however, there should be no premature rejoicing over gains that, on inspection, turn out to be wholly inadequate. Perseverance is what's indicated. Much, much more needs doing.