Tens of thousands of African students took to the streets of this African township today while several hundred demonstrated in downtown Johannesburg in protests over detention of their leaders and the double standards for education of blacks and whites in the country.

One 16-year-old youth was killed and another seriously injured by police gunfire in Soweto during a day of tense confrontations that may be the single, largest protest South Africa has experiencey during a year of racial unrest. Police said 130 youths were arrested when the Johannesburg demonstration was dispersed.

The Johannesburg demonstration was the first time Soweto students have successfully staged a protest beyond the confines of Johannesburg's African suburb of about 1 million population.

(Two children were crushed to death in Soweto when horses pulling a cart went out of control while rioters were pelting them with stones and sent the vehicle careening into a house, news agencies reported police as saying.)

Police appeared to have been taken by surprise by the students' two-pronged demonstration that began when a group estimated between 400 and 500, chanting nationalist slogans and raising fists clenched in the black power salute, marched on police headquarters in Johannesburg early this morning.

They surprised police by taking public transport into the city instead of attempting to walk the 12 miles, as a crowd of about 20,000 tried unsucessfully last year. Many carried angry signs declaring: "You shalt not kill our leaders," "Bantu (black) education is for the education of slavery," and "Vorster, released our leaders," a reference to Prime Minister John Vorster.

After the march from city hall to the police headquarters in early morning traffic, the students knelt down in front of a row of police guarding the entrance and sang in African dialect, "We want our land back."

Baton-wielding police - two summoned in such haste they were sockless in the bitter winter chill - moved forward and edged the students back up the street. The incident became angry when one student swore at a policeman, who then tried to catch him. Students burst into a run to escape, but officials said later that about 130 were arrested.

Many were caught when they attempted to escape through the back door of a restaurant. Several were beaten with police batons, according to a photographer on the Johannesburg Star who was ordered not to take pictures of the incident.

One student said the group planned to present a petition appealing for the release of student leaders detained less than two weeks ago allegedly to prevent violence on June 16, the first anniversary of racial unrest in South Africa's black townships.

After the early morning incident in Johannesburg, trouble erupted in several areas of Soweto as columns of students marched through the township, again singing and carrying banners.

One sign was addressed to the former president of the Soweto student council, Daniel Sechaba Montsitsi, one of those held in detention. It said: "Sechaba, a child by the name of Uhuru (freedom) is about to be born by Mother Azania (the African name for South Africa). Don't commit suicide. You have a taste of freedom in store."

The plea refers to the 18 blacks who have died while in police detention. In each case, police have said it was suicide.

One column in Phefeni sub-township in Soweto was estimated to stretch over a half-mile long in files of 20 persons. One officer said the demonstration was initially so peaceful that a police van drove down the center of the column without incident.

The shooting occurred when a police car stationed near Orlando High School was "violently attacked by a large mob," according to Maj. Gen. David Kriel, deputy commissioner of police in charge of riot control.

Kriel said four shotgun rounds were fired in self-defense. A high school student was killed and another youth wounded.

Anger turned into violence as police confronted students in at least seven areas of the sprawling township, first using tear gas then a more debilitating gas.

Students shouted at the police, "We are not fighting" and "Give us more tear gas," and refused to move. When they did disperse, they often regrouped later.

There were several incidents of cars stoned or set alight. Officials said four public buses were gutted by fire. All public transport in the township was suspended.

This afternoon police switched from tear gas to guns as students switched from taunting to stone-throwing. Plainclothes officers fired warning shots during most of the later confrontations which moved rapidly from one trouble spot to another, and then back again.

But today's trouble was different from the two-day commemoration of a year of unrest last week when camouflage riot police were visible at all vital installations, schools and strategic points, and were often backed up by armored personnel carriers, vans and police dogs.

Today most police wore plainclothes and drove unmarked cars. There were no armored vans in sight which in the past have tended to provoke students. Officials apparently wanted to make their presence as low-key as possible.

The students also appeared to be better prepared for a confrontation. In several cases, they carried newspapers to light when tear gas was thrown. The flames weakened the gas.

Late in the day police reinforcements from the capital, Pretoria, about 35 miles away, were called in to help the 2,000-strong Soweto force, Soweto chief Jan Visser said said police had done all they could to exercise restraint, but "unfortunately and much to my regret, certain situations got out of hand today."

Authorities described the situation in the township tonight as tense but under control.

An exiled South African black leader said in Rome today that "preparations are afoot" for an armed struggle by the country's blacks against the white government, United Press International reported. Oliver Tambo, president of the African National Congress, predicted an "explosion" in South Africa that would involve the rest of the world.