South African police today detained three more leaders of the country's main black nationalist movement, the United Democratic Front, bringing the number arrested in recent months to 19.

Those arrested today under a law that permits indefinite detention without trial were the front's general secretary, Popo Molefe; its publicity secretary, Patrick Lekota, and a former Transvaal provincial secretary, Moses Chikane.

A police spokesman said in Pretoria tonight that they had been arrested in connection with unrest in black townships near Johannesburg last August and September.

Fifteen other front members are in custody on allegations of high treason relating to this unrest. Although they have not been formally indicted after four months, judges are prohibited from granting them bail under the terms of a declaration by a government-appointed attorney general that they are a danger to the state.

Today's detentions, which brought widespread protests from civil rights organizations, came as President Pieter W. Botha made his third attack on the black nationalist organization in five days, labeling it an "internal extension" of the outlawed African National Congress, which is directing an underground guerrilla war from exile.

Speaking to the small Asian chamber of the country's new, racially segregated, tricameral Parliament, Botha accused the front, which describes itself as a nonviolent antiapartheid organization, of trying to "mobilize the masses and incite them toward confrontation with the authorities."

The front's purpose in doing this, the president added, was "to create a spiral of violence which will culminate in revolution."

Such an allegation by the chief executive places the black organization under the country's stringent security laws, which not only empower the government to charge such presumed revolutionaries with treason but to restrict them and outlaw their organization without recourse to the courts.

Botha's attack and the arrest of the front leaders took place against a backdrop of continuing unrest in many parts of the country.

Black crowds stoned vehicles and set fire to schools, houses, community halls and business premises in a number of black townships of the eastern Cape Province today, and police reported that another 10 people had been killed since the weekend.

This brings to more than 300 the number of blacks who have died in the unrest that has continued almost without interruption since August. Most have been killed in clashes with the police, but many have died when mobs of blacks have turned on nonwhites regarded as collaborators in the hated system of apartheid, or strict racial separation.

As the violence continued mainly in eastern Cape Province, there was further drama today at the hearings into last month's police shooting of 20 blacks near the eastern Cape city of Uitenhage.

Three ambulance men, who testified last Friday that they had seen five bodies, including that of a 2-year-old child, dumped in a washroom at the hospital where the injured were taken after the shooting, told the commission of inquiry today that they had been fired from their jobs by the local council that runs the ambulance service.

Summoned to explain the firings, council secretary Nigel Anderson told the judge conducting the inquiry, Donald D. Kannemeyer, that he had dismissed the men because they had given "twisted" evidence to the hearing.

The ambulance men had told the hearing that three senior officials had instructed them to hide facts from the commission, and "I could in no way allow this disrespect to continue," Anderson said.

He added that he could not give an assurance that other ambulance men due to testify before the commission would not also be fired if they gave evidence which was "a disservice to the council."

One of the ambulance men, Joseph Berry, told the commission Friday that he had withheld some information from the police who investigated the shooting because of what he took to be a threat by a superior officer that he would lose his job if he told all that he had seen.

After questioning Anderson, Judge Kannemeyer said the council secretary had done "serious damage" to the inquiry because other ambulance men would not feel that they could testify freely.

The judge did not indicate what action he might take, but an official said that the attorney general of Cape Province might decide to prosecute the secretary.