JOHANNESBURG, South Africa (AP) _ Blacks staged rallies nationwide today to mark the 14th anniversary of the Soweto student uprisings that led to nationwide riots and spawned a generation of militant anti-apartheid activists.

More than 50 events were planned throughout the country to observe June 16, 1976, or ''Soweto Day,'' when police opened fire on black students protesting the education policy of the white-led government.

Soweto, the huge black township outside Johannesburg, has 2.5 million residents and is the center of anti-apartheid activism.

The government lifted the 4-year-old state of emergency in most of the country a week ago as part of a series of reforms by President F.W. de Klerk.

The president has allowed peaceful protests that have official permission. For first time since the 1976 riots, widespread demonstrations were expected to take place on ''Soweto Day'' without police intervention.

Police shootings in Soweto in 1976 led to an unprecendented wave of unrest which spread throughout the country and lasted for several months. Some 500 to 700 blacks died.

The first person killed, 13-year-old Hector Peterson, has become a symbol of youthful resistance to apartheid. Thousands of black youths fled the country during and shortly after the uprisings to join anti-apartheid groups such as the African National Congress.

Most of today's events were planned by the ANC and other black groups such as the rival Pan Africanist Congress.

But in the central town of Welkom, 250 members of the white supremacist Afrikaner Resistance Movement marched to protest the detention without charge of two whites.

Members dressed in khaki uniforms gave stiff-armed, Nazi-style salutes and chanted, ''Hang (Nelson) Mandela.'' They then marched to a nearby police station and handed in a petition protesting the detentions.

The two men are being held in connection with separate bomb attacks in Pretoria and Welkom, but no one has been charged in either case.

In downtown Johannesburg, police fired tear gas to dismiss a few dozen black demonstrators, saying they did not have permission for the protest. A black journalist was taken into custody, according to witnesses.

The 1976 protests were caused by a government policy to teach classes in Afrikaans rather than English. Afrikaans is the language of the Dutch- descended Afrikaners who dominate the government and many blacks consider it the ''language of the oppressor.''

Every year since 1976 blacks have observed June 16 as an unofficial holiday. Most blacks stay home from school and work. ''Soweto Day'' has traditionally been marked by public meetings, many of which have been stopped by police.

The ANC, the country's largest black opposition group, stressed that the inferior black education system that caused the 1976 unrest still exists. Black teachers are holding strikes and protests throughout the country and some black schools in urban areas have been closed for much of the year.

Last year, only 42 percent of black high school seniors passed their final examinations required to receive a diploma. The government's per pupil expenditure on whites is about five times more than on blacks.