Brazil and the International Monetary Fund, at loggerheads for the past seven weeks, initialed an accord this week that again retrieves the world's largest indebted nation from the brink of default.
But Brazil may have won back the graces of the world financial community at a high social price:
In order to loosen the IMF's purse strings, President Joao Baptista de Oliveira Figueiredo had to announce three economic austerity packages, the last of which cuts deeply into the real wages of those on the bottom rungs of the social ladder.
Declaring these ''difficult moments, bitter decisions'' last week, Figueiredo unveiled the most radical measure yet - a reduction of wages to only 80 percent of the consumer price index.
The economic package apparently caught even some Cabinet ministers by surprise. And it is a blow to the social policy Brazil constructed a decade ago that gives workers a hedge against inflation (which is expected to reach 170 percent by the year's end). Officials in Brasilia predicted the measure would put the brakes on the speeding ''inflation elevator'' of wages chasing prices chasing wages. Foreign creditors nodded broad consent.
It was just this - galloping inflation and unchecked public spending - that caused the IMF to hold up a $411 million loan installment at the end of May. The IMF's red light in turn stopped the flow of private bank money, including a $630 million installment of a giant rescue loan and nearly $4 billion in new loans Brazil hoped to negotiate.
This forced Brazil into a standoff with the Swiss-based Bank of International Settlements (BIS), which refused to extend for the third time Brazil's deadline for repayment of a $400 million bridge loan.
Staring point-blank at default, Brazilian economic ministers sped to all points on the globe: Finance Minister Ernane Galveas jetted to Venezuela, reportedly to barter manufactured goods for oil, and Planning Minister Delfim Netto stole away to London for a series of mysterious meetings with creditors.
Finally the BIS blinked. Brazil missed another repayment deadline without incident, promising that the soon-to-come IMF money would be quickly handed over to the Swiss bank. But this intricate financial brinkmanship has left many Brazilians fuming over foreign ''meddling'' and embittered many against the keepers of the Brazilian state.
The measures also appear to have emboldened unionists, who have called for this country's first general strike in 20 years of military rule. The action - which protests the salary cuts, demands suspension of Brazil's debt and a break with the IMF - has the support of 137 unions and, according to polls, nearly 50 percent of Sao Paulo's population.
The strike call follows three days of April riots in Sao Paulo and a worker walkout that paralyzed the auto industry and halted work at the nation's largest oil refinery.
Sao Paulo's Second Army was ordered into ''preparedness'' as workers shouted nationalist slogans (''moratorium now,'' ''out with the IMF'') and occupied some factories.
The president of the metalworkers union in Sao Paulo said this week he ''fears incidents'' with military police, and Brasilia's national security council is girding for what it calls this ''inopportune'' workers' action.
Many are wondering if Brazil's move toward democracy will stand the strain. Some say the Army is too divided to pull off a coup. More prevalent is the feeling that the economic crisis will last for some time. But as austerity measures reach into the pockets of not only the poor but also the politically bankable middle class, the Figueiredo government could find its core support badly eroded.