MALINA, a trendy restaurant in a city south of Moscow, was empty on a recent Thursday evening. “A crisis,” the manager explained nervously. Some meat and fish dishes were missing. “Sanctions,” he added with a sigh. The signs of a country in the economic doldrums are visible in Moscow, too. Tour operators are going out of business; shops and small businesses are up for sale; LED displays outside bureaux de change send spirits sinking.

Russia’s economy is teetering on the verge of recession. The central bank says it expects the next two years to bring no growth. Inflation is on the rise. The rouble has lost 30% of its value since the start of the year, and with it the faith of the country’s businessmen. Banks have been cut off from Western capital markets, and the price of oil—Russia’s most important export commodity—has fallen hard. Consumption, the main driver of growth in the previous decade, is slumping. Money and people are leaving the country.

This is not the mid-1980s, when a collapse in the oil price paved the way for perestroika and the eventual collapse of the Soviet Union. Nor is it 1998, when the country defaulted on its debts. While the overall mood is clearly depressed, it is a long way from panic. Russia’s total foreign debt is just 35% of GDP; it has a private sector which can be surprisingly agile and adaptable and is contributing some growth by substituting things made at home for imported goods; most importantly, it has a floating exchange rate that mitigates some of the oil-price shock.

No longer affordable

But the oil-backed consumption-led economy which has provided nearly 15 years of growth (it took a stumble in 2008-09, during the global financial crisis) has hit the buffers. It was already slowing before the oil price began to fall and adventurism in Ukraine was met by Western sanctions. Indeed some see the Ukrainian conflict as a response to the country’s economic woes—an attempt to shore up through patriotic fervour the support that president Vladimir Putin can no longer buy by boosting living standards.

In 2007, when oil was $72 a barrel, the economy managed to grow at 8.5%; in 2012 oil at $111 a barrel bought growth of just 3.4%. Between 2010 and 2013, when oil prices were high, the country’s net outflow of capital was $232 billion—20 times what it was between 2004 and 2008. Russian economists are now debating how long before the economy faces collapse. Most think it can totter on for two years or so. But there is a real chance things could get a lot worse a lot sooner.

The depreciation of the rouble, which closely tracks the oil price, has helped Russia cushion its budget as that price has slumped (see chart). When the oil price falls, so does the rouble; thus in rouble terms the amount of money the oil brings in stays roughly the same. But it cannot buy as much. Russia imports a great deal—the total value of imported goods, $45 billion in 2000, was $341 billion in 2013—and so a devalued rouble quickly stokes inflation. It is predicted to reach 9% by the end of this year; for food the rate is higher still. If it is to compensate the population for this loss in its spending power, the government will have to run a bigger deficit. If it does not it will face discontent. A weak rouble also makes servicing foreign debt more expensive. Russia’s sovereign debt is just $57 billion, but its corporate debt is ten times as high. Some of it has been racked up by state corporations and national energy companies, which gives it a quasi-sovereign status. And by the end of 2015 Russian firms will have to repay about $130 billion of foreign debt. Mr Putin, who came to power in the wake of the 1998 default, knows the value of money and believes enough of it solves everything. He started off strongly averse to low reserves and high debt, and saw that the country’s reserves built up accordingly. In the run-up to the global financial crisis Russia had reserves of $570 billion—almost a third of GDP. This served the country well after the crisis hit; the government spent $220 billion refinancing banks and defending the rouble. In 2011, though, despite the high oil price, Russia’s reserves stopped increasing. Money was spent instead on raising salaries and pensions and financing the armed forces. The increase in military spending, up 30% since 2008, was the main reason Alexei Kudrin, Russia’s prudent finance minister, chose to resign in 2011.

At the same time Russian firms went on a borrowing spree. They have increased their foreign-currency debt by some $170 billion in the past two years. Yevgeny Gavrilenkov, the chief economist at Sberbank CIB, the largest state bank, says most of this money settled offshore; only a very small part was invested in the Russian economy. Kirill Rogov of the Gaidar Institute for Economic Policy points to one of the reasons why. When a company can be swallowed by the state at any time, more debt will make it less appetising prey. This growing debt meant, Mr Rogov notes, that instead of preparing itself for a crisis, Russia has prepared a crisis for itself.

This does not mean that Russia is anywhere close to a sovereign default like that of 1998. Then government debt was 50% of GDP and reserves just 5% of GDP. Today Russia is still running a current-account surplus of about $50 billion because it is importing less. Mr Putin’s restrictions on food imports, presented as tit-for-tat counter-sanctions, are more a way of preserving currency reserves and stimulating farms; Russia imports half its food. Food production is now growing at between 6% and 10%, albeit from a very low base. Other imports, such as medicines, are not so quickly replaced; as in Soviet days, petrodollars keep the shelves stocked.

The drop in oil prices in 2008-09 was met with a 40% increase in government spending. With reserves lower, and with the government needing to either keep those reserves available for bail-outs or to risk some big companies and banks going bust, that is not an option this time. Instead the country faces a period of stagflation. Renewed growth will require new investment and, most crucially, reform. What Russia needs most is what Mr Putin has done most to deny it: more competition.

A game of favourites

At a recent conference German Gref, the head of Sberbank, remarked that “[Soviet leaders] didn’t respect the laws of economic development. Even more, they didn’t know them, and in the end this caught up with them. It is very important for us to learn from our own history.”

Even though his state is as reliant on oil money as the Soviet Union was, Mr Putin thinks he has done some of that learning. But as someone who believes that the state must keep tabs on everything, including the free market, he remains mistrustful of open competition. While Russia has a nominally free-market economy, it is one highly skewed by the misallocation of capital and resources to firms run by cronies.

The Kremlin distributes oil rent via state banks to firms and projects which it selects on the basis of their political importance and their pro-Putin stance. Most of the contractors for the Sochi Olympics, which cost Russia a staggering $50 billion, were firms run by Mr Putin’s friends; most of the money took the form of credit from state banks. A number of these loans are unlikely to be paid back. Indeed, such loans are one of the reasons why the central bank has been forced to triple its provision of liquidity to the banks since the middle of last year.

Most of this money provided by the central bank, says Mr Gavrilenkov, ended up on the foreign-exchange market, putting pressure on the rouble. Since the central bank was known to intervene regularly to keep the rouble within a currency corridor, the banks could place one-way bets on the devaluation of the rouble. As a result the Russian financial sector expanded by 11.5% in 2013, although GDP grew by only 1.3%. In the past few weeks the central bank said it will intervene in an ad hoc way with as much money as it sees fit. This makes speculation a lot riskier. The central bank said it would also curb the refinancing of the banks. If it can stick to this in the face of lobbying pressure from state firms and banks demanding cheap liquidity and fresh equity, the currency could stabilise.

That pressure, however, will be immense, particularly if the economy starts to shrink. Rosneft, Russia’s national oil company, run by Igor Sechin, Mr Putin’s close confidant, is already asking the government for money, in part to help it repay $30 billion of debt which it took on when buying a successful private company, TNK-BP. “We can easily utilise 1.5 trillion-2 trillion roubles ($32 billion-$43 billion) from the National Wealth Fund,” Mr Sechin said recently. If so, what is to stop the next handout?

Pumping money into Rosneft would be exactly the sort of misallocation that underlies the economy’s weakness. The energy sector, which accounts for 20% of GDP, grew by a meagre 1% on average over the past decade. The industry has not been cutting costs or developing new production; it has been busy being nationalised instead, and offers textbook examples of the woes of state-owned enterprises (see article) While the state still had money, it could afford to buy out private owners, as it did in the case of TNK-BP. Now it simply wrestles oil firms away from their owners, as it is doing in the case of Bashneft, a medium-sized but fast-growing oil firm which is being expropriated from Vladimir Yevtushenkov, a billionaire who is under house arrest. Political loyalty—and Mr Yevtushenkov was certainly loyal—is no protection against raiding.

During the fat years, Mr Putin had an easy job satisfying all. Now he will face a tough decision whether to support the inefficient energy sector and the military-industrial complex with public money or rely on the more dynamic flexible small and medium-sized companies to pull Russia out of the crisis. There have been reports that Mr Putin plans to give a speech on economic liberalisation to parliament next month. But, if he runs true to form, when faced with a crisis he will stick with the state sector run by his friends rather than ceding control and trusting private firms which will demand reforms and, in the end, political freedoms.

The echo of 1913

The state of the Russian economy will affect Russia’s actions beyond its borders. In 2013 the Russian people were better off than at any previous point in history. Their priorities, says Mikhail Dmitriev, the head of New Economic Growth, a think-tank, switched from economic survival to imperial resurgence. Mr Dmitriev compares the moment to 1913—the Russian economy’s last successful year before the first world war and the Bolshevik revolution. Then, too, there was patriotic euphoria; it did not survive the onset of losses in the war.

While people still support Mr Putin and Russia’s annexation of Crimea, they are starting to calculate the costs. Mr Dmitriev, who accurately predicted street protests in Moscow in 2011, argues that economic dissatisfaction is growing, although support for Mr Putin remains at a record high. “People’s priorities are switching back to basic survival needs,” he says: “salaries, social benefits, jobs.”

Protests driven by economic and also social issues have already started. Even in Moscow where the mood for protest is low, teachers and doctors have come out onto the streets to protest against pay cuts and restructuring. More protests are planned before the end of the month. Opinion polls show that most people neither support a real war in Ukraine nor are prepared for their children to fight in it. Alexei Tsulik, a small-time farmer who is counting on his 22-year-old only son for help, speaks for an increasing number when he says: “It is none of our business. We have plenty to do here on the farm.”