JOHANNESBURG, NOV. 22 -- The military leader of the Transkei homeland, Maj. Gen. Bantu Holomisa, foiled a coup attempt today by a small group of dissident officers and soldiers.

Seventeen soldiers were killed in the early-morning uprising, including Col. Craig Duli, a former Holomisa aide who led the coup attempt.

Duli and 11 other rebels reportedly were killed in Holomisa's 11th-floor office in Umtata, the capital of Transkei, a nominally independent black homeland spread over three areas within South Africa. Five soldiers loyal to Holomisa also died.

It was not immediately clear why Duli attempted a coup against Holomisa, whom he helped bring to power in a bloodless coup in 1987.

Holomisa had ordered his troops to try to capture Duli alive because he said he wanted to find out why his former military intelligence chief had attempted to oust him. "He owed us an explanation -- the people and the outside world," Holomisa told the South African Press Association (SAPA).

But Holomisa later told a SAPA reporter that Duli and 11 coconspirators were dead.

Umtata was reported to be calm but tense with stores closed, streets empty and loyalist troops surrounding the building where Duli had been holed up for most of the day.

Holomisa charged that the South African Embassy in Umtata had known about plans for the coup and failed to alert him, South African Foreign Minister Roelof F. Botha denied it.

Relations between Holomisa and the South African government have been tense for some time because of his strong support for the African National Congress. The ANC's chief of staff, Chris Hani, was allowed to use Transkei as a safe haven and base of operations before South Africa lifted a ban on the black nationalist organization.

In addition, Holomisa had angered South African authorities by preparing to hold a referendum that is expected to demand Transkei's reincorporation into South Africa, 14 years after it was created as the first of four black homelands under South Africa's apartheid system of racial separation.

ANC publicity secretary Paulo Jordan condemned the coup attempt and charged that an announcement by the South African police this morning that it was preparing to send in a task force to protect South African property and lives was "a pretext for intervention."

Holomisa had recently accused South Africa of allowing 800 men to train for action against him at a camp in northern Cape Province.

Holomisa and Duli had become bitter enemies in recent years. Duli had been imprisoned recently for illegal possession of arms but was released on bail pending appeal of his conviction.