Black guerrillas attacked a police station in this all black township Thursday night in one of the most daring incidents of urban terrorism ever carried out by insurgents here.

A black constable was killed and five persons wounded in the raid. Hundreds of police records were destroyed in a fire set by the three-man guerrilla team.

The attack appeared to be at least partially in retaliation for the April 6 execution of Simon Mahlangu, a 22 year-old guerrilla, following his conviction for taking part in the killing of two white men in June 1977.

The raiding guerrillas left behind leaflets urging support for the oldest black revolutionary movement in South Africa, the African National Congress, and for its military arm, Spear of the Nation.

One of the leaflets also said: "Remember June 1976; Remember Mahlangu. Take up arms and fight."

The Reference to June 1976 is to the eruption of black unrest that flared in Soweto at that time and spread to other black areas. Clashes between black youths and police left a heavy toll of dead and injured.

According to a police spokesman, the attack on the station appeared to be the first of its kind.

"I don't know of any other incident in which firearms and grenades have been used," said the spokesman, Brig. Albie Fourie, of the police press office in Pretoria.

Both government and black leaders have said they expect urban guerrilla activity to increase steadily as demands by blacks for equal political rights with the whites continue to be rebuffed by the government.

Police and Justice Minister Jimmy Kruger said tonight that South Africans "must accepted that infiltration of terrorists will increase."

According to police, the three men, armed with Soviet-made AK47 rifles and grenades, first shot the station's uard, Brian Temba, who died today in a hospital. They then ran into the corrugated iron police building. They shot the black policeman on duty at the front desk, seriously wounding him.

A witness then saw one of the attackers throw on object, believed to have been an incendiary phosphorous grenade, into an adjoining room, setting it ablaze, police said. The three then fled on foot leaving behind on unexploded Soviet-made grenade, AK47 ammunition and discarded shells, police added.

In anticipation of stepped-up urban terrorism, South African police have tried to prevent an influx of guerrillas from Neighboring countries. Johan Coetzee, head of the South African security police, told local newspapers last year that a special "antiterrorist task force" had begun patrolling the country's northern borders with Rhodesia, Mozambique and Botswana.

Last year, Parliament gave the minister of defense special powers over a six-mile wide barrier along the border. Recently, the minister of agriculture announced that special financial incentives would be available for farmers to lure then back to unmanned farms along the border. Repopulating the farms would impede guerrilla movements in the area, authorities said.

Despite these precautions, guerrillas have managed to infiltrate in what appears to be a steady, if slow, trickle.

Two weeks ago, explosives were found tied on a railway line in Soweto. Several other incidents have occurred in the rural areas north of Johannesburg and Pretoria.

In February, police announced the capture of two "terrorists" and a large cache of Soviet-made weapons. The month before, seven guerrillas engaged police in a skirmish. One guerrilla was killed and another arrested, the five others escaped.

Last November, a white police sergeant was wounded in an ambush by guerrillas. In other encounters last year, three guerrillas were killed and two white policemen injured, according to newspaper accounts.

Some of these incidents came to light weeks after they occurred, and it is possible other clashes have gone unreported by the police and press.

According to police, most of the guerrillas are trained by the African National Congress, which receives its military support from the Soviet Union.

Althought it is banned in South Africa, the Congress enjoys considerable support among blacks. Its president, Nelson Mandela, is serving a life sentence in the political prison on Robben Island. Mandela is also a founder of the Spear of the Nation.

The police regard the Congress as a more serious threat than its rival movement, the Pan-Africanist Congress, which is backed by China. In November, however, Kruger announced police had captured 23 guerrillas in South Africa who were affiliated with the Pan-Africanist Congress.