For more than a century the scramble for oil unleashed wars, forced unusual alliances and sparked diplomatic rows. Now the world's two biggest economies are battling over another precious resource: semiconductors, the chips that literally power our daily life.

These tiny fragments of silicon are at the heart of a $500bn industry that is expected to double by 2030.

And whoever controls the supply chains - a tangled network of companies and countries that make the chips - holds the key to being an unrivalled superpower.

China wants the technology to produce chips. That's why the US, a source of much of the tech, is cutting Beijing off.

The two countries are clearly engaged in an arms race in the Asia Pacific, says Chris Miller, author of Chip Wars and associate professor at Tufts University. But, he adds, there's more to the race: "It takes place both in traditional spheres, like numbers of ships, or missiles produced but increasingly, it's taking place in terms of the quality of Artificial Intelligence (AI) algorithms that can be employed in military systems."

For now, the US is winning - but the chip war it has declared on China is reshaping the global economy. The manufacture of semiconductors is complex, specialist and deeply integrated.

An iPhone has chips that are designed in the US, manufactured in Taiwan, Japan or South Korea, then assembled in China. India, which is investing more in the industry, could play a bigger role in the future. Semiconductors were invented in the US, but over time East Asia emerged as a manufacturing hub, largely because of government incentives, including subsidies.

This allowed Washington to develop business ties and strategic alliances in a region vulnerable to Russian influence during the Cold War. It's just as useful now, in the face of Beijing's growing influence in the Asia Pacific.

The race is on to make the best and most efficient chips at scale - and the smaller, the better. The challenge: how many transistors - tiny electrical switches that can turn a current on or off - can you fit onto the smallest bit of a silicon wafer?

"It's what the semiconductor industry calls Moore's law, essentially doubling the transistor density over time, and that's a hard goal to achieve," said Jue Wang, a partner at Silicon Valley at Bain & Company. "It's what enables our phones to get faster, our digital photo archive to get bigger, our smart home devices to get smarter over time and our social media content to get richer."

Getting there is not easy even for the top chip-makers. In mid-2022, Samsung became the first company to start mass producing three-nanometre chips at scale. Later that year, Taiwan Semiconductor Manufacturing Company (TSMC) - the world's biggest chip-maker and a major supplier to Apple - followed.

How narrow is that? Much narrower than a strand of human hair, which is about 50 to 100,000 nanometres. These smaller "leading edge" chips are more powerful, which means they go into more valuable devices - supercomputers and AI, the internet of things.

The market for "lagging edge" chips - which power the more mundane bits of our lives, such as microwaves, washing machines and refrigerators - is lucrative too. But demand will likely wither in the future. Most of the world's chips are currently being made in Taiwan, giving the self-ruled island what its President calls a "silicon shield" - in other words, protection from China, which claims the territory.

Beijing too has made chip production a national priority and is investing aggressively in supercomputers and AI. It is nowhere near being a global leader but has been catching up quickly in the past decade, especially in its chip design capabilities, Mr Miller says.

"What you find historically is that whenever powerful countries have advanced computing technology, they deploy them to intelligence and military systems," he added. This, and the dependence on Taiwan and other Asian countries for supply, is rattling America.

The Biden administration is trying to choke China's access to the technology that makes chips. Last October, Washington announced sweeping export controls making it virtually impossible for companies to sell chips, chip-making equipment, and software containing US tech to China, no matter where they are based in the world.

It also banned US citizens and permanent residents from supporting the "development or production" of chips at certain factories in China. This hits China hard because it imports both the hardware and the talent that fuels its nascent chip-making industry.

The Netherlands' ASML stands to lose about a quarter of the revenue it used to earn from China. It's the only company that makes the most advanced lithographic machines - the tools that make "leading edge" chips.

"Talent is so important in this area... if you look at the executives of China's semiconductor companies, a lot of them hold American passports, they are trained in the US, and they have green cards. So that is a really big problem for China," says Linghao Bao, analyst at policy research firm Trivium China.

The US also wants to make more chips. The Chips and Science Act offers $53bn of grants and subsidies to companies making semiconductors in the US. Major players are taking advantage of that. TSMC is investing in two plants worth $40 billion in the US, their only facilities outside of Taiwan.

Micron, the largest US-based manufacturer of memory chips - essential for supercomputers, military hardware and any device that has a processor - has announced plans to spend up to $100bn over the next 20 years in a computer chip plant in upstate New York.

"The Chips Act is able to bridge the cost gap that exists in production in the US versus Asia," says Sanjay Mehrotra, the chief executive of Micron Technology. "Micron will continue to invest in our fabs plants in Asia. What is important is that there'll be a level playing field across the globe." The US's restrictions are hitting China where it hurts.

Apple reportedly shelved a deal to buy memory chips from one of China's most successful chip companies, Yangtze Memory Technologies Corp (YMTC), in the wake of the restrictions. The Huawei experience is how this is likely to play out, according to Mr Bao. The communications giant went from being the second-largest smartphone maker in the world, after Samsung, to essentially dead, Mr Bao says.

"So that's how easy it was for Washington to cripple a Chinese tech company. China doesn't really have a good option to respond to that. Previously, the US was targeting individual Chinese companies. But this time, the scope has expanded to the entire country."

Can China do anything in response? Withdrawing goods or services, or imposing its own export controls, could do more damage than good at a time when its economy is facing a severe slowdown.

Beijing has complained to the World Trade Organization (WTO) but a resolution could take years. Meanwhile, experts say, China will double down on investment and support for its domestic chip-making industry.

"We will focus national strategic needs, gather strength to carry out indigenous and leading scientific and technological research, and resolutely win the battle in key core technologies," President Xi Jinping said at the Chinese Communist Party's 20th Congress in October. In the short term, the industry has to contend with a global slowdown because of the war in Ukraine, rising inflation and a bumpy re-opening of China's economy.

Beijing will want to tread carefully given that its economy took a huge hit through the Covid pandemic.

"There will still be a lot of back and forth between US companies, Taiwanese companies, Chinese companies and firms from other countries. It's really only at the cutting edge in logic and memory chips, where we're going to see a concerted effort by the US to cut China out of innovation networks and an effort by China to build up its own US-free supply chain," Mr Miller said.

He adds that could mean a partial decoupling of the ecosystem - one focused on China and one on the rest of the world. That has huge ramifications for the global economy. It will force players to pick sides, possibly cutting many off from accessing the Chinese market.