COLOMBO, Sri Lanka (AP) — Sri Lanka’s government said Tuesday it is discussing obtaining another loan from Beijing to repay some of its debt to Chinese banks after China told the nearly bankrupt island nation it was not in favor of restructuring existing loans.

Sri Lanka has nearly $7 billion in foreign debt due for repayment this year and will need to repay $ 25 billion over the next five years. A severe shortage of foreign exchange means the country l acks money to buy imported goods, leading to shortages of food, fuel and other essentials.

The economic crisis has brought weeks of protests across the country calling for President Gotabaya Rajapaksa’s resignation.

Government spokesman Nalaka Godahewa said Beijing was balking at restructuring Sri Lanka’s debt because it does not want to set that precedent. He told reporters the finance ministry will announce details of discussions with China later.

Earlier this month, the government said it was suspending repayment of foreign loans pending negotiations with the International Monetary Fund for a loan restructuring plan.

Sri Lanka’s debt problems are partly because it built infrastructure like a port, airport and road networks using Chinese loans, but the projects are not making money.

Rajapaksa had asked Chinese Foreign Minister Wang Yi, who visited Sri Lanka in January, to restructure those loans.

The government issued its statement a day after Chinese Ambassador to Sri Lanka Qi Zhenhong said China was doing its utmost to help Sri Lanka. Qi scoffed at suggestions Beijing has Sri Lanka in a debt trap.

“Western developed countries, especially those who colonized Sri Lanka in history, should also come and help,” a Tweet from the Chinese embassy quoted Qi as saying.

“The debt trap is only a myth, created and hyped by some foreign media and politicians intentionally,” Qi said. He said China is neither the biggest nor the only lender to Sri Lanka and Beijing’s projects are provided on concessional terms.

Japan, the World Bank and the Asia Development Bank are other large lenders, having begun the process of aiding Sri Lanka’s economy much earlier than China.

Qi said it was “unrealistic” to expect all projects or loans to be flawless.

Central Bank figures show existing Chinese loans to Sri Lanka total around $3.38 billion, not including loans to state-owned businesses, which are counted separately and thought to be substantial.

Godahewa also said that the Cabinet has approved a project to offer residence visas for up to 10 years to foreigners who buy apartments in the country costing at least $75,000 and those who deposit more than $ 100,000 in local bank accounts.

He said the offer was made to help the construction industry weather the economic crisis and to attract more foreign currency.