PRETORIA, South Africa (AP) _ A coal mine security guard testified today that police from a former paramilitary unit that had a long record of atrocities took part in last week's massacre of more than 40 blacks.

But the policeman cited as a source denied involvement, and police officials also denied the charge.

In stunning testimony, the guard, Mandla Mngomezulu, told a government commission that policemen based at the Greenside coal mine were transported to the Boipatong township south of Johannesburg and participated in the slaughter.

Despite the denials, the testimony could bolster the African National Congress' longstanding claim that police have instigated township violence. Police deny the charge and say the fighting is largely a power struggle between the ANC and the Zulu-dominated Inkatha Freedom Party.

The African National Congress, the leading black group, broke off political negotiations with President F.W. de Klerk's government Tuesday to protest the June 17 massacre at Boipatong, one of the country's worst mass killings.

ANC leader Nelson Mandela sent a harsh letter to de Klerk today that listed demands for resuming talks and accused the president of relying on ''white supremacist mechanisms.''

''The continuing direct and indirect involvement of the government, the state security forces and the police in the violence ... has created an untenable and explosive situation,'' Mandela wrote.

The ANC's demands for resuming talks include: an international commission to investigate township violence, establishment of a multiracial interim government, prosecution of police allegedly involved in violence and a ban on carrying weapons in public.

Mngomezulu, a security guard at the mine, said one of the policemen, Jeremiah Shikongo, told him he went to Boipatong the night of the attack. He testified that Shikongo said he did not participate in the assault, but his police colleagues did.

But Shikongo, a former member of the Koevoet counter-insurgency unit during South Africa's colonial rule of Namibia, told the commission Mngomezulu was lying.

''Know that the story of Boipatong is untrue. I never spoke to him,'' Shikongo said.

The two black men testified in Pretoria before the government-appointed commission on violence, headed by Judge Richard Goldstone. It was set up last year to investigate political unrest that has killed some 8,000 blacks in the past three years.

The commission has no authority, but most leading parties have declared its periodic reports to be impartial.

The ANC and Boipatong residents have accused police of transporting Zulus from a workers' hostel to the township and of failing to halt the four-hour attack in which adults and children were shot and hacked to death.

Police today reiterated their denials of involvement. Johan van der Merwe, commissioner of police, said a preliminary police investigation found ''no evidence whatsoever'' implicating former Koevoet members.

Mngomezulu, believed to be an ANC supporter, gave testimony that supported residents' claims of police complicity. But other testimony appeared contradictory.

Residents have consistently said the attackers spoke Zulu. But Koevoet was made up mostly of uneducated rural blacks from Namibia's Ovambo tribe, who do not speak Zulu. The unit also included some white South Africans.

Members of Koevoet - Afrikaans for ''crowbar'' - were frequently accused of abuses in Namibia, where they waged a bush war against guerrillas of the South-West Africa People's Organization, the group that led Namibia to independence two years ago.

Most Koevoet members were forced to leave the newly independent country for fear of retribution. Some members of the unit were reassigned to the South African police.

Mngomezulu said armed policemen left the coal mine in minivans at night on many occasions and did not return until early morning.

Police have acknowledged that 40 former Koevoet officers are now based at the Greenside mine in Ogies, 80 miles from Boipatong. But police said they were there to prevent theft in the area and were not linked to township fighting.

Goldstone Commission members visited the mine Wednesday and found trunks of rifles and ammunition at the police barracks.

The coal mine, owned by Gold Fields of South Africa, said it rented out empty space to the South African police to house the men, but said it did not monitor police or their activities.