As violence flared up again in a number of South Africa's segregated black townships over the Christmas holidays, the imprisoned leader of the main black underground movement, Nelson Mandela, refused an indirect government offer to release him under restrictive conditions.

The offer, the second this year that Mandela has refused, followed widespread speculation that after four months of racial unrest South Africa was getting ready to talk with his outlawed African National Congress.

In another development, police headquarters in Pretoria announced last night that counterinsurgency units had engaged in several skirmishes with African National Congress guerrillas during the past three weeks in a remote area that borders southern Mozambique, killing two of them and capturing a large cache of arms.

The announcement came as Mozambican President Samora Machel blamed South Africa openly for the first time for continuing guerrilla activity in his country, in violation of a nonaggression treaty signed last March.

Revived violence in the townships came after two weeks of comparative calm. More than 150 blacks were killed in street clashes and thousands were wounded and arrested in previous unrest. In a Christmas message, President Pieter W. Botha had paid tribute to the police and Defense Force for restoring order.

This morning, the South African Press Association reported that 10 blacks had been injured and eight arrested in fresh violent outbreaks in eight townships in the Johannesburg-Pretoria region. The homes of three township councilors were attacked, the news agency added.

Attacks on black councilors, who are regarded as collaborators because they hold office within the segregationist system of apartheid, have been a feature of the disturbances. Eight have been killed and more than 30 injured since August.

On Christmas Day, about 1,000 young blacks clashed with police as they returned from tending the graves of people killed during the unrest in Sharpeville township, south of Johannesburg. The crowd set fire to a warehouse as police guards fired at them. When the police ran out of ammunition, members of the crowd chased them and set fire to the house of one.

At least six youths were wounded by police bullets, the agency said.

The tending of the graves was in observance of a call by an alliance of antiapartheid organizations, called the United Democratic Front, to observe a "Black Christmas" because of the casualties during the unrest.

Other clashes occurred in four townships east and south of Johannesburg and in the Pretoria township of Atteridgeville.

Mandela, 66, who has served 21 years of a life sentence for plotting the overthrow of white-minority rule, was offered asylum by President Kaizer D. Matanzima of Transkei, a tribal homeland given nominal independence.

According to the country's most influential Afrikaans newspaper, Beeld, Mandela rejected the offer in a "sharply worded" letter that the government suppressed under its censorship laws.

In March, Mandela refused an offer of conditional release also made through Matanzima, who is a relative. A statement by Mandela said he would never accept a conditional offer of release nor have any dealings with blacks such as Matanzima whom he regards as collaborators.

The offer to Mandela came at a time when there has been a growing movement among reformists in the ruling National Party to release him and other imprisoned leaders of the African National Congress, which was driven underground 24 years ago, and to begin talks with them about the country's future.

These reformists, a small but influential minority of white Afrikaner intellectuals, have been shaken by the unrest that followed the introduction of a new constitution last August. They apparently had hoped blacks would accept it as the first step in a gradual process of change. Instead, blacks appear to regard the constitution, which gives a small political role to the mixed-race and Asian minorities while still excluding the African majority, as a sham.

Beeld sent an assistant editor, Piet Muller, to Zambia earlier this month for a five-hour interview with exiled leaders of the banned African Congress, which may not even be quoted in South Africa.

Muller wrote that while the gulf between the two sides was vast, if a meeting took place "there will be enough things on which a fruitful discussion over a wide front can be held."

In a supporting editorial, Beeld wrote: "It takes courage and conviction for a government to start talks with extraparliamentary groups, even if such talks are held in secret. Still, the mere possibility of such talks will give millions of people new hope for the future. A future that is acceptable by all can only be planned by all together."

An opinion poll published a few days later indicated that 43 percent of whites favored negotiations with the African National Congress, while 44 percent opposed.

President Botha quickly put an end to growing speculation that the government was considering release of congress leaders, possibly as a dramatic gesture to blunt the impact of planned visits by Jesse Jackson and Sen. Edward M. Kennedy (D-Mass.) early next year.

Last Saturday, Botha said he had no such intention and that the government would not negotiate with any organization that advocated change through violence. He forbade any National Party members of Parliament to meet with leaders of the exiled congress.

The police announcement of new skirmishes with congress guerrillas seemed timed to reinforce Botha's hard line. The statement, on the front page of Beeld today, said the skirmishes had been taking place since Dec. 6 and had resulted in two guerrillas being killed, with four others and six sympathizers arrested.

It said a "temporary ANC base" had been attacked and a cache of guns, mines and ammunition captured in the Ingwavuna region of Natal Province, a salient that juts northward between Swaziland and the Indian Ocean to Mozambique's southern border.

The appearance of congress guerrillas in that region suggests that some slipped across the border after Mozambique and Swaziland signed nonaggression treaties with Pretoria early this year.

Both countries agreed to expel congress members from their territory, while South Africa undertook to stop aiding rebels of the Mozambique National Resistance movement who are trying to overthrow the Marxist government.

Despite the treaties, guerrilla activity has continued in both Mozambique and South Africa. The resistance movement has extended its activities, and in a bitter Christmas Day speech President Machel openly accused South Africa for the first time of dishonoring its side of the bargain.

Speaking at a rally 50 miles north of Maputo, in the heart of the territory where the rebels are particularly active, Machel said South Africa was continuing to "sustain, develop, equip, infiltrate and supply" the rebels.

South Africa denies doing this and has tried to mediate in peace talks between the resistance movement and the Machel government, but these efforts reached a deadlock a month ago.

Last weekend, Foreign Minister Roelof F. (Pik) Botha paid a secret visit to several undisclosed East African countries -- including, it is thought, Malawi, Kenya and the Comoro Islands -- in an apparent effort to negotiate a sealing off of the resistance movement's supply routes into Mozambique.

Swaziland, meanwhile, has continued to draw closer to South Africa, expelling and arresting congress members in its territory. It signed a new trade agreement with South Africa in Pretoria today.