The first national strike in 20 years of Brazilian military rule brought this city of 13 million almost to a halt today and sparked massive protest marches throughout the country.

In Sao Paulo State, the number of people arrested was estimated at nearly 290, and 12 union leaders were detained. The strike did not spread much beyond greater Sao Paulo, where 18,000 military police were mobilized and the Army and Air Force were ordered on alert.

"We succeeded in transforming Sao Paulo on a Thursday into a Sunday," said Jair Meneguelli, former head of the Sao Paulo metalworkers' union, who was stripped of his union presidency because of previous strike action this year.

Union leaders called the strike to protest austerity measures imposed by the government in response to pressures from the international banking community.

The unionists called on the government to break relations with the International Monetary Fund, suspend payments on the country's foreign debt of nearly $90 billion and repudiate economic controls that have reduced workers' purchasing power.

Throughout Sao Paulo, Brazil's largest city, merchants who stayed open remained behind half-closed steel gratings, and a number of shops closed for fear of vandalism and looting. Traffic flowed smoothly on Sao Paulo's broad avenues through the morning and evening rush hours.

The government was quick to label the strike a "total failure." Roberto della Manna, labor relations head of the Sao Paulo industrial federation, said, "We were confronted with a national strike, that became a state strike, that shrank to a regional strike, that ended up being a municipal one."

However, della Manna admitted that production in the huge auto and steel manufacturing plants in Latin America's largest industrial city were reduced to between 40 and 80 percent capacity.

Workers claimed to have shut down several companies completely, including Ford, Caterpillar and the Brazilian aeronautics giant Embraer.

There were protest marches in Brasilia, Porto Alegre, Rio de Janeiro and Belo Horizonte. The shipyard in the Rio de Janeiro suburb of Niteroi also was partly shut down.

The general strike drew a harsh reaction from Brazil's press; "Provocation" was the title of the lead editorial in the leading daily, O Estado de Sao Paulo. Even the leaders of the opposition parties, such as Rio de Janeiro State's governor, Leonel Brizola, and Minas Gerais Gov. Tancredo Neves, issued stern warnings against any strike action, saying they would tolerate only passive protests.

The strike did not convulse Brazil as did a series of riots in Sao Paulo three months ago. However, the protest caught Brazil at a delicate moment.

President Joao Baptista Figueiredo is recuperating from double bypass heart surgery in the United States, leaving his civilian vice president, Aurelianao Chaves, in charge of a sharply divided house.

Brazil, at loggerheads with the International Monetary Fund for the past seven weeks, finally initialed a new accord on Monday. The impasse had virtually shut off Brazil's flow of foreign investment and sent the world's largest debtor into default.

Brazil will now use the fund's $411 million loan installment to pay off a $400 million loan from the Bank of International Settlements, which last week agreed to a third postponement of repayment.

Figueiredo's last austerity package, which bit deeply into workers' real wages, persuaded creditors to open their purse strings. The measure reduces salaries to only 80 percent of the consumer price index, a severe blow to workers faced with 170 percent inflation.

Many here worried that the strike would provoke the military into going back on its promise to continue Brazil's gradual return to democracy.

Two weeks ago, when 67,000 metalworkers and 1,300 petroleum workers walked off their jobs, federal censors muzzled Sao Paulo's Radio Bandeirantes in the middle of a newscast. This time, Brasilia took preventive action, ordering broadcasters to suppress news of the strike.