Who would have guessed just three years ago that the David Cameron government would be the author of the boldest change in British foreign policy since the second world war? That is exactly what is now unfolding.

The process began this year when the British government announced it would join a Chinese initiative to help fund Asia’s enormous infrastructural needs. The UK became the first non-Asian country to join the Asian Infrastructure Investment Bank (AIIB), after which more than 30 other countries joined, including Germany and France.

The United States opposed the decision because it saw the AIIB as a threat to the International Monetary Fund and the World Bank. Britain has long been the US’s foreign policy shadow, so the decision to join the AIIB was the most significant act of independence since 1944, when John Maynard Keynes argued with America’s Dexter White at Bretton Woods over the new international financial order.

The underlying thinking behind the British decision has since become clear. This was no flash in the pan. The key mover is the chancellor, George Osborne. His approach is based on a recognition of the profound changes in the global economy caused by China’s rise. At the time of the last state visit to Britain by a Chinese president, that of Hu Jintao in 2005, the UK economy was still slightly larger than that of China: today China’s GDP, by the most conservative measure, is over three times greater. We are fast becoming a minnow by comparison.

Since 2005, the financial crisis has rendered western growth rates close to zero, left their economies debt-ridden, and made the global economy ever more dependent on China for growth and capital. This is the new reality that imbues the thinking of any government, right or left. To their great credit, Osborne and his party have seized the nettle.

The courageous decision to join the AIIB bestowed an advantage on the UK. From being a western laggard in its relationship with China, Britain moved to the front of the queue. Cameron’s claim that the UK could be “China’s best partner in the west” was not empty rhetoric, nor was the idea of a “golden decade” in Sino-British relations.

President Xi Jinping’s visit this week is likely to see many new commercial agreements between the two countries. Britain’s much-neglected infrastructure requires huge capital investment, money it does not have. The willingness of the Chinese to invest in HS2, a new programme of nuclear reactors and the so-called “northern powerhouse” offers opportunities that otherwise would be impossible. At the same time, the City of London is the largest offshore market for the renminbi, which could be crucial to its long-term future. Xi’s visit will greatly enhance the growing cooperation between China and the UK and give further shape to what might be described as Britain’s pivot to China.

Of course, there will be those who object on the grounds that the UK, in its embrace of China, is moving away from the US. However, the situation is rather more complex. China is rising; the US is declining. By 2030 it is projected that the Chinese economy will be twice the size of the US’s. Can Britain, or any country, ignore this? Most countries in the world in varying degrees are pivoting to China just as once, in America’s heyday, they pivoted to the US. This is about the force of gravity, not the ivory tower.

Take Australia, a very close and long-term American ally. China now accounts for over a quarter of its exports – far greater than America’s share. That, by default, means Australia has come to enjoy a much closer relationship with China: the Australians now talk of America as “our ally” and China as “our very good friend”.

Those who want to ignore or deny these realities are living in a world that is growing smaller and less important by the day. Countries either change with the world or are rendered insignificant and marginal by those changes. The British government has recognised this and deserves support for doing so.

Of course there is understandable unease. China is a very different proposition from the US. Whereas historically we share much with the latter, that is not true of China, which comes from entirely different historical and cultural roots. As a result there is much room for disagreement and misperception. There is a powerful presumption in the west that China should be like us: it never has been and never will be. We must learn to accept this and try to understand China on its own terms rather than ours.

We are uncomfortable about China’s human rights record which, by our values, certainly leaves a great deal to be desired. But even here there is a bigger picture. China has taken 600 million people out of poverty, arguably the single biggest global contribution to human rights over the last three decades. Over the same period China has become a much freer society. The nation is a work in progress. Its human rights record is not a reason to reject a much closer relationship with it.

The new turn to China offers Britain the prospect of modernising our infrastructure in a way that otherwise would be inconceivable. It will create many new jobs. Above all it shows how Britain can prosper in the Asian-oriented and China-centric world rapidly unfolding before us.