AFTER a soporific summit with Barack Obama, President Xi Jinping’s address to the United Nations General Assembly seemed unlikely to set pulses racing. By comparison, his speech on September 28th was a show-stopper. It revealed that China’s relations with the UN have what its ties with America lack: a sense of direction and even engagement.

China used to disparage the UN. Even though it is one of five permanent members of the UN Security Council, it repeatedly abstained from votes, accounting, from 1990 to 1996, for two-thirds of all abstentions by the permanent members. Since then China’s behaviour at the UN has changed profoundly. Over the past few years it has increasingly used the body as a vehicle for its international ambitions.

A simple measure of its new engagement is China’s contribution to the UN budget. In 2015 it handed over $140m, or 5% of UN revenues, about the same as Britain or France. That compares with $67m (3%) in 2010. According to Zhang Guihong, director of the Centre for UN Studies at FudanUniversity in Shanghai, by 2018 China will be the UN’s third-largest contributor.

China’s new involvement focuses on three areas of UN activity: peacekeeping, climate negotiations and development. In the decade after 1971, when China dislodged Taiwan to take up a seat on the Security Council, it loftily ignored all peacekeeping votes (not even bothering to abstain). Maoist dogma held that peacekeeping was interference in the affairs of weaker states.

Mao Zedong must be turning in his mausoleum. Early this year China dispatched its first combat troops to a UN blue-helmet mission, in South Sudan. It has over 3,000 soldiers and policemen deployed with the UN, placing it ninth by size among countries providing peacekeepers. In his speech to the UN, Mr Xi said China would increase the number to 8,000 as part of a permanent UN peacekeeping force. He added that China would also give the African Union $100m for its own standby force.

In 2009 China was one of the countries that helped scupper a global treaty on climate change. This time, it has done more than most to push a treaty forward. Since the treaty is negotiated as part of the UN Framework Convention on Climate Change, this counts as a second example of cosying up to the UN.

At his meeting with Mr Obama, Mr Xi promised $3 billion to help the poorest countries cope with the costs of climate change. True, this money is being channelled through a Chinese institution called the South-South Co-operation Fund, rather than into the UN’s own Green Climate Fund. But the offer is likely to push other donations towards that fund. Moreover, by endorsing the idea of a “low-carbon transformation” and by saying that monitoring and transparency in global environmental matters need to be improved, Mr Xi and Mr Obama boosted the efforts of those trying to negotiate a new treaty (see article).

As with the climate, so with the UN’s development goals (targets for reducing the proportion of the world’s population living in poverty, and other worthwhile aims). The UN laid out such targets for the period between 2000 and 2015. China ignored them. Yet on September 26th Mr Xi not only signed up to a new set of “sustainable development” goals, but also came armed with the cash to help meet them: $2 billion for the poorest countries to spend on health, education and economic development; $1 billion for a new China-UN “peace and development fund”; debt forgiveness for the poorest countries; $2m for the World Health Organisation; and so on.

China has long seen itself as a leader of the world’s poor. The $6 billion-plus it is stumping up for UN climate and development programmes is by far the largest amount it has pumped into development abroad. By channelling much of it through the UN, it is using the international system to bolster its claim to global leadership.

Closer to home, though, it behaves rather differently. In July 2015 the Permanent Court of Arbitration, which rules on disputes arising from international treaties, began hearing a case brought by the Philippines over the nature of China’s territorial claims in the South China Sea (the two are among several countries disputing islands and reefs in the area). China refused to take part in the arbitration and argued that the UN Convention on the Law of the Sea (UNCLOS, which it has signed) does not apply. The UN, it turns out, has its limitations.

China is willing to rearrange the institutional furniture in its back yard, too. Its new Asian Infrastructure Investment Bank, which is due to open its doors in December, is the clearest example. China is also trying to expand the Shanghai Co-operation Organisation, which began as a defence pact with Russia and Central Asian countries, to include more security and economic ties. India is likely to join next year. Iran may join, too.

China’s foreign minister, Wang Yi, recently said his country “is a staunch supporter of the international order” and that “there is no reason why China should challenge [it]”. Globally, that may be true, and Mr Xi is spending billions making good his support. But nearer home China is looking to remake that order. It remains to be seen how it manages the tension implicit in its new engagement with the UN.