Brazil redeemed its own goal in the opening match of the World Cup last week, when the team went on to win 3-1 against Croatia. In the streets outside the São Paulo Stadium, the country scored an own goal of a different sort as police took on demonstrators staging a massive service delivery protest.

The New York Times reported on Friday: “More than 300 demonstrators gathered along a main highway leading to the stadium. Some in the crowd tried to block traffic, but police repeatedly pushed them back, firing canisters of teargas and using stun grenades.”

Apart from protesters, Associated Press photographers and a CNN producer were reportedly injured in the fracas. The chaos highlighted the problems facing the world’s seventh-biggest economy, which grew only 0.2 percent in the first quarter, compared with the previous quarter.

Brazil, like South Africa, is a member of the fragile five – countries with low growth, high inflation and vulnerable currencies. The other three are India, Indonesia and Turkey.

The five were the major casualties when the Federal Reserve started to turn off the money taps. For five years, the US central bank provided cheap money to boost the country’s economy. In May last year it signalled the situation would change and followed through in January this year. The cut in cheap funding in the US prompted an outflow of funds from emerging markets – a process that has already started reversing.

However, the damage was done and will take time to repair. While some of the pressure is cyclical, as in South Africa, many of the problems are deeply rooted.

In a report earlier this year, The Economist magazine blamed Brazil’s “rigid labour market, impenetrable tax code, burdensome bureaucracy and fragile public finances” for keeping the economy from expanding faster than a sluggish 1 percent to 2 percent a year.

Though inequality in Brazil, with a gross national product (GDP) of $2.2 trillion (R23.5 trillion), is not as serious as it was 10 years ago, problems remain. People are dissatisfied with their prospects and see the soccer event as a drain on the country’s resources. While the Brazilian government argues that hosting the soccer extravaganza will boost GDP growth, its critics claim the benefits will not be greater than the cost of the stadiums and other infrastructure.

Similar arguments were raised when South Africa hosted the games in 2010. CNN recently cited South Africa’s experience as an example of the doubtful trade-offs. It quoted a research paper, published in the Journal of African Economies, which said South Africa attracted about 220 000 extra tourists from countries outside southern Africa during the 2010 World Cup and 300 000 over the entire year. “That means the country spent a whopping $13 000 per visitor,” the paper said.

South Africa also scored an own goal last week when Standard & Poor’s (S&P) downgraded its credit rating from BBB to BBB-, one level above junk status, largely due to slow GDP growth, the platinum strike and the risks this might pose for “the fiscal consolidation path”. In other words the rating agency fears the government will not be able to moderate its budget deficit (the gap between revenue and spending in a fiscal year).

Brazil suffered a similar demotion in March, when S&P cut its rating from BBB to BBB-, citing concerns about debt levels due to sluggish growth and expansionary fiscal policy.

South Africa has also had its outlook shifted from stable to negative by Fitch, a sign of a pending downgrade.

Rating downgrades increase the cost of raising funds in the capital market, effectively raising the country’s future debt levels. Once a sovereign falls below investment grade its bonds fall out of the spectrum of investments acceptable for global pension funds and other major institutional funds. This is critical to South Africa, which ran a current account deficit equal to 5.1 percent of GDP in the fourth quarter of last year.

The deficit is the gap between earnings on exports of goods and services and the import bill. Offshore investment is needed to plug the gap.

The end game is when countries start to borrow to pay their interest costs. Neither South Africa nor Brazil are in immediate danger of sliding into this debt trap but both may be perched at the top of a very slippery slope.