SHARPEVILLE, SOUTH AFRICA, JUNE 4 -- Amid scenes rarely experienced here, with black children cheering and chanting his name, President Pieter W. Botha today was given something akin to honorary citizenship of this most evocative of all of South Africa's black townships.

For the normally stiff and authoritarian Botha, it was a rare public relations success as he and his wife Elize plunged into black crowds to shake hands while television cameras photographed the extraordinary scenes and an army of security police and six senior Cabinet ministers looked on in astonishment.

But there were also occasions when the deep hostility within the black community revealed itself above the natural spontaneity of the crowds and the ceremony.

It seemed clear to observers that the occasion, in which Botha was made a freeman of Sharpeville and five neighboring black townships administered by a body called the Lekoa council, was meant to demonstrate that the government had crushed the black uprising that began here 2 1/2 years ago and that Botha was now ready to resume his task of reshaping the apartheid system of segregation.

For the second time in two weeks, the president declared that he regarded his landslide victory in last month's whites-only election as a mandate to negotiate a new political arrangement and that he wanted to become more personally involved in talking to black leaders about this.

But he also made clear once again that the adjustments would have to be within the framework of his government's policy of racially segregated political structures, which entrench white minority control, and that he would talk only to black leaders who accepted this system.

Turning to the black mayor of the government-approved council, who has been in hiding for much of the time since the unrest erupted here in September 1984, Botha said: "People ask me who are the authentic leaders I want to confer with. I am telling you, sir, that you are one of those authentic leaders."

Most of the ceremony took place outside a community hall in Sebokeng, the biggest of the six townships, where the Lekoa council is officially located. Yet it was the smaller, older and more run-down ghetto of Sharpeville five miles away that remained the symbolic centerpiece of what was happening.

More than any other place in South Africa, the name of Sharpeville is woven into the soul of the black resistance. Here, on a sunny autumn afternoon 27 years ago, police opened fire with machine guns on a crowd of 7,000 men, women and children who had gathered to protest laws that required all blacks to carry passes determining where they might live. When the guns fell silent, 69 blacks lay dead and more than 200 wounded.

In September 1984 it was more than just a protest against the white authorities. Under apartheid's expanding system of indirect rule, black councils like Lekoa, elected in heavily boycotted polls, had become targets of black nationalist hostility. It was they who now collected rents for the state-owned houses and evicted those who could not pay.

As violence erupted in the Lekoa area, young radicals turned on the councillors, killing four of them.

Others, including the mayor, Esau Mahlatsi, who presided over today's ceremony, fled for their lives. Four more resigned.

In the two years that have followed no candidates have been prepared to offer themselves for election to the eight vacant seats, and most of the remaining 31 councillors have lived in a protected compound outside Sebokeng.

But with the massive security crackdown that began last June and the detention without charges of an estimated 25,000 black activists, the government now feels it has gained the upper hand.

The freeman ceremony, with Mahlatsi honoring Botha, seemed intended to symbolize the government triumph.

The main ceremony did not go smoothly. A subdued crowd of about 4,000 was waiting outside the community hall when Botha landed.

Mahlatsi, after praising Botha as a great leader, unexpectedly told him to drop his idea of a multiracial Statutory Council to advise the government and instead to give blacks equal representation with whites in the central parliament, which is anathema to the government.

There was some cheering and the waving of small Lekoa flags that had been distributed by officials, but a number of people interviewed in the crowd made clear their hostility to the president and said they had come to hear what he had to say about "our rent situation." Others said simply that they had come "to see what he looks like."

The day brightened for Botha when he moved on to Sharpeville. First he made a scheduled stop at the humble red-brick home of an 86-year-old pensioner, Klaas Ramatsebe.

Scores of neighbors swarmed out of their homes to behold the unimagined sight of the white president visiting their township. They flattened Ramatsebe's neat garden and the fence surrounding it in their scramble to reach and touch Botha and his wife.

As night fell, Botha was driven to a football field in Sharpeville where 2,000 schoolchildren between the ages of 6 and 12 had been assembled to cheer him and chant his name.

The president and his ministers strode across the turf to their waiting helicopters under a blazing African sunset to the sound of excited young voices chanting "Bo-tha! Bo-tha!" in this citadel of the black resistance.