JOHANNESBURG, JULY 22 -- A senior African National Congress official confirmed today that his organization has accelerated the infiltration of guerrillas into South Africa despite the start of talks with the government on finding a political settlement to the racial conflict here.

South African press reports said today that security forces recently have arrested up to 40 guerrillas and officials of the ANC's military wing, Spear of the Nation, most of whom belong to the Communist Party.

The reports said the arrests included seizures of weapons stockpiled in preparation for a plan to launch an insurrection if talks for a new non-racial political system break down. The ANC's chief internal organizer, Walter Sisulu, confirmed that "significant arrests" had taken place in the last few weeks and that they included two senior ANC military officials.

Responding to news of the arrests, Sisulu said, "People have always been infiltrated here since we launched our armed struggle in the 1960s. But under the new climate, it can be expected that many more would return." The government has legalized Spear of the Nation, and guerrillas no longer may be arrested simply for membership in the organization, which has said it continues to recruit men as guerrillas and send them abroad for training.

Sisulu said he did not believe the arrests, which he called "unwelcome," would upset plans for the ANC and government to meet Aug. 6 to finalize an agreement on the release of political prisoners and the return of exiles in return for an ANC commitment to "suspend hostilities."

The infiltrations, plus recent militant comments by Spear of the Nation chief of staff Chris Hani, illustrate the complexity of South Africa's current phase, in which the ANC remains committed to armed struggle even while holding talks with the government to open the way for constitutional negotiations.

The ANC's stance on armed struggle and the government's legalization of Spear of the Nation have made it difficult for authorities to crack down on proliferating right-wing paramilitary and vigilante groups, which argue that they have as much right as the ANC to operate.

Hani infuriated the government last week by saying the ANC "might have to seize power" if the negotiations failed. President Frederik W. de Klerk accused him of violating the spirit of the agreement between the ANC and the government that commits them to work for a peaceful settlement and an end to violence.

In the nominally independent homeland of Transkei, Hani today rejected that criticism, saying Spear of the Nation "must expand to protect us." ANC guerrillas armed with AK-47 rifles were reported to have appeared at three rallies where he spoke, the first time they have appeared in public with weapons. Their presence raised speculation that the Transkei government may have agreed to allow Spear of the Nation to use Transkei as a base of operations. Transkei formally is beyond the jurisdiction of the South African security forces and courts.

Hani is increasingly controversial among whites, in part because the Communist Party has confirmed that he is a leading party member.