China is renegotiating billions of dollars of loans to Venezuela and has met with the country’s political opposition, marking a shift in its approach to a nation it once viewed as a US counterweight in the Americas.

Venezuela is facing one of the worst crises of its 200-year history, with a collapsing economy and political deadlock stoked by the oil price slump. China, which is Caracas’s biggest creditor and has loaned the country $65bn since 2005, has already extended the repayment schedules for debts backed by oil sales.

Beijing has also sent unofficial envoys to hold talks with Venezuela’s opposition, in the hope that if President Nicolás Maduro falls his successors will honour Chinese debts, sources on both sides of the negotiations told the Financial Times. Its recognition of Mr Maduro’s fragile position and the rising clout of the opposition, led by Henrique Capriles, is another sign that the diplomatic noose is tightening around Caracas’s socialist government.

“One fact we shouldn’t overlook is that Venezuela really doesn’t have the money,” said Guo Jie, a Latin America expert at Peking University. “I think there will be a rational solution for both parties, be it loan repayment extension or a loan restructuring.”

Fears that Venezuela might default on its internationally-traded debt continue to rattle markets, where its bonds trade at distressed prices. The benchmark 2022 bond currently yields 33 per cent.

Venezuela wants a grace period whereby the country would pay only the interest due on Chinese loans, Reuters reported last week. But China also wants approval from the opposition-held national assembly, thus tying the opposition to any deal.

José Guerra, an opposition member of the legislature’s finance commission, confirmed the talks. “It is true that some [opposition] lawmakers and consultants have met with the Chinese…Both sides want a close-up,” he said.

Further coverage of the far-reaching implications of the protracted slump in oil prices

One aim of the talks was to “maintain a relationship [looking] probably at a post-Maduro era,” he added.

“We are willing to work…with Venezuela to carry out more pragmatic cooperation across the board including financial cooperation based on equality and mutual benefit,” foreign ministry spokesman Lu Kang said.

Mr Capriles has toured South America seeking support for a constitutionally-allowed referendum, which could remove Mr Maduro from office but which has been stymied by the government-controlled electoral council.

He last week met the presidents of Argentina and Paraguay and Brazilian foreign minister José Serra. Peru’s president elect, Pedro Pablo Kuczynski, said this month that his government would take a tough line on Venezuela’s democratic abuses.

The International Monetary Fund forecasts that the Venezuelan economy, which earns 95 per cent of its export revenues from oil sales, will shrink by 8 per cent this year, while inflation will reach 480 per cent. Imports have more than halved over the past five years, leading to acute shortages of basic goods and sporadic food riots.

BancTrust, a Latin American investment bank, said a Chinese debt restructuring could free up cash equivalent to about 650,000 barrels of oil per day, thereby “alleviating [national] cash flow needs…[which] might help the government to improve staple goods supply.”

One Chinese oil industry insider, who believes it is in the country’s long-term interests to accept “looser” conditions, said: “Certainly the terms of the [Sino-Venezuelan] debt will have to be renegotiated. But there’s no way it could be totally overturned.”

A decade ago, at the height of the oil price boom, then-president Hugo Chávez declared in Beijing that Chairman Mao Zedong and Latin American independence hero Simón Bolívar would have been friends. However, repeated China visits by Mr Chávez soon led Beijing to question his reliability as a partner.

A Venezuelan default would set a worrying precedent, given the large sums that China has lent to resource-rich countries in the past 15 years. Beijing has rolled over soft loans to some developing countries and, more recently, forgiven some African debts. But Venezuela’s amounts are far bigger.

“It’s happened before, look at Zimbabwe or the Myitsone dam” in Myanmar, the oil insider said. “But such a large exposure is unprecedented for us. We haven’t faced a national default before.”