On a tiny island off Brunei’s northern tip on the South China Sea, thousands of Chinese workers are building a refinery and petrochemical complex, along with a bridge connecting it to the capital, Bandar Seri Begawan.

When completed, the first phase of the US$3.4 billion complex on Muara Besar island, run by China’s Hengyi Group, will be Brunei’s largest-ever foreign investment project and comes at a time when the oil-dependent country needs it the most.

Brunei’s oil and gas reserves are expected to run out within two decades. As production falls, oil firms will not be investing much in existing facilities, further hampering output, oil analysts say. As a result, the country’s oil revenues, which provide virtually all of Brunei’s government spending, are in steady decline.

With youth unemployment rising, Brunei’s ruler, Sultan Hassanal Bolkiah, is trying to quickly reform the economy and diversify its sources of income, while fighting graft and cracking down on dissent.

Brunei’s changing fortunes have been reflected in its financial industry. HSBC pulled out of Brunei last year, while Citibank exited in 2014 after 41 years. Bank of China, meanwhile, opened its first branch in the sultanate in December 2016.

The Muara Besar project is promising more than 10,000 jobs, at least half of which would go to fresh graduates, media reports in Brunei said. But claims that thousands of Chinese workers have been shipped in to build the complex has angered some residents.

“There are no jobs for us, so why create some for the Chinese?” asked one shopkeeper in the capital city.

Hengyi Industries, the local company building the refinery, did not respond to requests for comment. The company, founded in 2011 and based in Bandar Seri Begawan, expects to complete the first phase of the refinery and petrochemical complex on Muara Besar by the end of the year, according to its website.

A US$12 billion second phase would expand the refinery capacity to 281,150 barrels per day and build units to produce 1.5 million tonnes per year of ethylene and 2 million tonnes per year of paraxylene, the company said last month.

Total Chinese investment in Brunei is estimated at US$4.1 billion, according to the American Enterprise Institute’s China Global investment tracker.

That will almost certainly rise as China ramps up its “Belt and Road Initiative”. Sometimes called the “21st Century Maritime Silk Road, it envisages linking China with Southeast Asia, Africa and Eurasia through a complex network of ports, roads, railways and industrial estates.

“Brunei is an important country along the 21st century Maritime Silk Road,” Chinese ambassador to Brunei Yang Jian said at the opening ceremony in February 2017 for a joint venture, running Brunei’s largest container terminal.

Accumulated US foreign investment in Brunei, by contrast, was just US$116 million in 2012, the latest figures available, according to the US State Department.

China has invested about US$205 billion in East Asia between 2010 and 2017, according to the China Global investment tracker.

It has been increasing those investments while tussling with four other Southeast Asian nations, including Brunei, over competing claims to islets and atolls in the South China Sea.

“Building good relations and offering big investments are part of China’s strategy to split Southeast Asian nations to ensure there is no consensus on South China Sea matters,” said Jatswan Singh, associate professor at the University of Malaya in Kuala Lumpur, who has written four books on Brunei.

“The sultanate is hard-pressed for investments to diversify its economy and in this sense the Chinese investments are important to [Brunei],” he said. Brunei has not commented publicly about its territorial claims in the South China Sea.

There was a time not so long ago, with oil prices over US$100 a barrel, when Brunei citizens could care less about jobs at a refinery.

Squeezed between two Malaysian states on the island of Borneo, Brunei provided cradle-to-grave benefits for its 420,000 citizens, including zero taxes, subsidised housing and free education and health care.

But the sultan has had to whittle back some of those benefits – Brunei has been in recession for three straight years – and tighten up the ship of state.

The 71-year-old Bolkiah, the world’s second-longest reigning monarch, reshuffled his cabinet again last month, replacing six top ministers – just over a couple of years after they were appointed. No explanation was given.

Sources close to the government and foreign diplomats say Bolkiah wanted to weed out corruption and address grumbling among the Malay-Muslim majority who are unhappy with the pullback in welfare programmes, budget cuts and unemployment.

In the last available official report in 2014, the unemployment rate was put at 6.9 per cent. Unofficial figures suggest youth unemployment could be as high as 15 per cent.

“A majority in Brunei expect a job in the government, state-linked firms or in the oil and gas sector, but all three have been hit pretty hard,” one Western diplomat said.

Bolkiah, who is also the prime minister, controls the key portfolios of defence, finance and foreign affairs.

The sultan’s office did not respond to a request for comment and newly appointed ministers refused to comment during National Day celebrations last week.

But the sultan is still popular. He marked 50 years in power in October, with a glittering procession through the capital on a gilded chariot, cheered by well-wishers.

But in the long run, an economy based on dwindling single source of income could erode the relationship between the ruler and his subjects, said Muang Zarni, democracy advocate and a former research fellow at the London School of Economics.

“That doesn’t mean that will translate into street protests, but Bruneians know things are not as rosy as they appear in the sultan’s newspapers and TV channels,” said Zarni, who quit the University Brunei Darussalam in 2013 over what he said was a lack of academic freedom.