XI JINPING, China’s president, was chummy in public when he met Nicolás Maduro in Beijing in early January (pictured), praising his Venezuelan counterpart as a “good friend of the Chinese people”. Behind closed doors, negotiations must have been far more tense. Chinese banks have lent $50 billion to Venezuela since 2007. With its economy in a deep recession, Venezuela’s ability to repay these debts is in grave doubt. Investors trading Venezuelan bonds would see default as a virtual inevitability but for China’s involvement. Having already lent so much to Venezuela, will it give Mr Maduro yet more to prevent his country from going over the edge?

And Venezuela presents just the first such dilemma for China. The second-biggest recipient of Chinese loans in South America is Argentina, which is also suffering as commodity prices swoon. It has started drawing on Chinese credit to stop its currency reserves from shrinking further. Then there is Russia. Chinese banks have lent more than $30 billion to Russian oil companies. As Russia’s economy crumbles, the promise of yet more Chinese cash is one of its few pillars of support.

China is seen as a possible saviour of all three countries—their lender of last resort, the one banker to keep the money flowing when others turn away. That is testament to China’s remarkable growth; as recently as 2010, it was still a net recipient of foreign aid. But it also casts a pall over China’s record in international lending.

China has dramatically scaled up its global loan book over the past five years by dealing with countries largely ignored by Western lenders, whether for political reasons (Russia) or economic (Argentina). Moreover, these loans have come without the kinds of policy conditions normally imposed by the International Monetary Fund. Instead of insisting on fiscal rectitude, China has more often demanded that borrowers award contracts to Chinese construction companies. Since 2008 China has also agreed some $500 billion in currency swaps with nearly 30 countries, from Canada to Pakistan, which gives the counterparties access to yuan when trouble is brewing.

At the same time, China is setting up development banks intended to challenge the dominance of the World Bank and the IMF. Its actions stem in part from frustration at how little say it and other developing countries still have in their running. An agreement struck in 2010 to boost the voting power of emerging markets would still leave America with a veto over big decisions, yet Congress has repeatedly failed to ratify even that unsatisfactory deal (see article). With China on track to surpass America as the world’s biggest economy within a decade, the anachronistic state of global economic governance is growing ever more glaring.

Fast-developing

China is not waiting. In July it partnered with Brazil, Russia, India and South Africa to form the New Development Bank, a World Bank knock-off with $50 billion in capital. The five also plan to pool $100 billion of foreign-exchange reserves for any of them to tap in a crisis. In October China led the creation of the $100 billion Asian Infrastructure Investment Bank (AIIB), a rival to the Asian Development Bank, which is dominated by Japan. A month later it announced a $40 billion Silk Road Fund, to be managed by another development bank backed by China. With or without the delayed reforms, the circumstances of the World Bank and the IMF will change, since China has charted a course to become an alternative banker to the world.

The question is what kind of banker China will be. To be sure, it is easy to get ahead of reality. The swaps offered by China are symbolically important, but are “more like straws than lifelines” for countries gasping for liquidity, says Eswar Prasad of Cornell University. And the guiding principle of China’s activity as lender of last resort is mercantilism. It wants to safeguard its investments in Argentina, Venezuela and Russia. “Business is business,” says Yu Yongding, a former adviser to China’s central bank.

It is not quite that simple, though. One essential part of China’s plan is to internationalise its currency. Yuan are not as useful as the dollars the Federal Reserve offers through currency swaps, but providing loans in a squeeze is a good way for a central bank to acquire global clout. The Bank of England’s role as a lender of last resort in the Overend Gurney panic of 1866 helped establish sterling as an international currency. By the same token, the Fed’s swaps with foreign banks after the financial crisis bolstered the dollar.

But China’s support for Argentina, Venezuela and Russia is also risky. There is an element of adverse selection: in the hunt for global commodities, China has dealt with countries shunned by others. When trade deals morph into financial support, it increases its exposure to losses.

A bigger concern is that China’s ambitions for the yuan are prompting it to lower its capital controls before its cloistered banking system is ready. Even the IMF, long an advocate of faster financial reform in China, has urged it to be more cautious. The total of unexplained capital outflows from China has steadily increased in recent years, hitting $63 billion in the third quarter of 2014.

China does appear to be learning from its mistakes. China Development Bank’s foreign loan growth has slowed from nearly 50% a year in 2009-11 to just over 10% in 2013. Even before oil prices collapsed, says Erica Downs of Eurasia Group, CDB had grown much warier about lending to Venezuela, tying its financing to specific projects. In other words, it is becoming a little like the World Bank.

What is more, China’s decision to establish new multilateral development banks is an implicit admission that its unilateral approach was not working. Jin Liqun, the head of the AIIB, has travelled to capitals around the world to promise that it will adhere to the highest standards of corporate governance. Officials at the Asian Development Bank, the lender most directly challenged by the AIIB, say they have been working closely with China to help it get off to a good start. Chinese officials have even requested advice about the designs of different development banks, hoping to learn from them. This suggests that China is not looking to overthrow the existing order so much as to claw its way into it.