The South African government will build a new, permanent subdivision outside Cape Town for the black squatters of Crossroads, the shantytown that last year attracted international attention when the government announced it would be demolished and most of its residents would be sent back to impoverished rural areas.

The decision, announced in Cape Town tonight by Black Affairs Minister Piet Koornhof, is a reversal of the hard-line attitude of his predecessor, Connie Mulder, on the issue that had become a symbol of resistance to South Africa's migratory labor system.

Last year Mulder announced that the squatter community of 3,000 corugated iron shanties housing more than 20,000 people would be torn down within a few weeks. The men, women and children who were not legally living in the area would be given a one-way ticket back to the Transkei, the area from which most of them had come.

The demolition would also have forced families who had legal rights to reside in Cape Town to move in with relatives and friends in already crowded homes int he three established black townships of Cape Town.

Koornhof's move is also a shift in the government's racial policy for the Cape Peninsula where the oldest white settlements, some going back 300 years, are located. This policy has aimed to keep the peninsula as a "preferential area for non-black South Africans.

The significance of the decision is that Koornhof, with the backing of Prime Minister Pieter W. Botha, has been able to get a more realistic humane solution to the Crossroads squatter situation pst a considerable conservative faction within the government and the ruling National Party caucus. Koornhof tonight said the decision had been approved by both the Cabinet and the caucus.

To achieve this, however, Koornhof had to adopt the piecemeal approach he used as minister of sports and recreation when he pioneered limited racial integration in many sporting events.

In a telephone interview, Koornhof said characteristically, "Yes, it is a change in policy, but don't present it as a change in policy."

The construction of the new township is therefore likely to be emphazied as an exception to, rather than a reversal of, the freeze on the construction of black housing in the Cape.

Koornhof indicated this when he described the decision as "an important contribution to the ad hoc solution for Crossroads."

The shantytown, built on sandy ground near Cape Town's airport, is a product of this country's racial policies which restrict blacks to the poorer countryside unless their labor is required in the cities. Even with a permit to work in an urban area, blacks do not necessarily qualify for permanent residential rights there.

With the aid of white activist lawyers, professors, students and clergy, the squatters of Crossroads hav ewaged a stubborn legal battle against the police and government for the past 3 1/2 years to remain at their shanty community. Their efforts intensified after the government bull-dozed two other squatter camps, Unibell and Moderdam, in 1977.

The dquatters were harassed by police who conducted armed searches for those lacking permits to live in the area. One man was killed by police in one such night raid last September. Thousands of others were arrested and forced to pay fines that amounted to more than $70,000 during the past year.

Shortly after he was appointed last November, Koornhof stopped the raids and in a gesture of goodwill, visited the camp to meet with the santytown's elected leaders. He promised a "humane" solution to Crossroads and in his statement tonight said, "I do not believe that anything would be served by forcibly moving such families from Crossroads without housing them elsewhere."