POLITICIANS, even of the detribalised sort such as I, do not enjoy eating humble pie. But recent events in Brazil and Turkey and the reversal in the flow of funds from emerging markets makes this unappetising dish obligatory fare. Living in Argentina — with frequent hops across the border to Rio de Janeiro to savour the samba beat and quaff caipirinhas, the national cocktail — was equivalent to what in the US is called "drinking the Kool-Aid". You got so intoxicated on the good news and the positive data that you averted your gaze from other inconvenient truths hiding in plain sight in front of you as well.

Until last week’s rolling riots in Rio and beyond, it was easy to be a cheerleader, as indeed I have been since my return here, for Brazil representing, in the words of analyst Nicholas Lemann, "the perfect trifecta" of high growth (unlike Europe and the US), political freedom (unlike China) and falling inequality (unlike practically everywhere).

Brazil and Turkey — another high-performing developing economy that seemed to embrace democracy — were two mascots of the new conventional wisdom: that the emerging world was "enjoying" a better crisis than the developed world.

I was not alone in my wonderment. The Wall Street Journal described the extraordinary presidency of Brazil’s Luis Inacio Lula da Silva between 2002 and 2008 as exemplifying "pragmatic politics that are at once pro-Wall Street and pro-favela". And recent metrics chimed with this assessment: last year, it ousted the UK as the world’s sixth-biggest economy and 28-million Brazilians, about 15% of its nearly 200-million population, had been lifted from poverty into the lower rungs of middle-class life. The world expressed its approval by awarding Brazil hosting rights for next year’s Soccer World Cup and the 2016 Olympics.

On a return visit in March to this hemispheric giant, my enthusiasm was tempered somewhat when sitting for several hours in Sao Paulo’s Guarulhos International Airport, which struck me as the grim aviation equivalent of Dante’s Inferno.

Then there was the small matter of trying to prepare a lecture and relying on the country’s eccentric internet connectivity, which makes Telkom’s speed and bandwidth a world-beater by comparison.

Still, I reasoned, the country was increasingly producing things the world wanted to use and consume, from Embraer jets to Havaianas slip-slops, and had in JBS the world’s largest meat producer. And the country sat on millions of hectares of soya beans and surrounded by a sea of oil.

But in the past week, the party came to an end, or a temporary stop, and the fizz went out of the caipirinhas as Brazilians took to the streets raging against Lula’s hand-picked successor, Dilma Rousseff. The precise agenda of the citizens’ anger is diffuse: it started with the price of bus tickets and has metastasised, across more than 80 cities, into a freewheeling agenda from rallying against corruption to repressive policing. Just as in the "Arab Spring", and more recently in Turkey, the protests are largely leaderless and have used the social media to galvanise numbers and spread the word.

Of course the key to understanding a central ailment in Brazil lies in the gross domestic product numbers: during its surge up the league tables of the world, Brazil was posting 7%-9% annual growth, much of it fuelled on easy credit and loose monetary policy courtesy of the US Federal Reserve. Even before Ben Bernanke announced that his foot would be taken off the pedal of quantitative easing, Brazil’s overheated economy had slowed to a crawl of about 1% growth, doubtless fuelling the discontent in the streets.

A decade ago, in the surrounds of Liberal International — a collective of global parties — I encountered a man who had one of the most difficult jobs in the world, leading a liberal movement in Russia. Grigory Yavlinsky was the appropriately gloomy and intense founder of the Yabloko party, whose political harassment by the Kremlin made a mockery of any claims his country made to being democratic. But recently he drew a distinction about his own country’s incomplete transition from communism to a more open society and the present unease and protests facing strongman Vladimir Putin: "The protests at the end of the 1980s and in the 1990s were, to put it bluntly, protests over ‘sausage’. It was a consumer revolution. Today in Russia a bourgeois revolution is beginning — for freedom, human values and respect. I have no doubt about it, ‘sausage’ is no longer an issue."

This description fits Turkey today, even better than Russia. Its middle class has risen up against Prime Minister Recep Tayyip Erdogan whose ambition, in the words of the Financial Times, "has become limitless as his tolerance of dissent was limited". South Africa sits happily on the sidelines of this ferment right now. But I won’t eat another slice of humble pie by predicting for how long.