An egotistical president, an influx of foreign cash, and a massive pile of debt led to Sri Lanka handing over an entire port to China in December 2017, on a century-long lease.

That handover gave China a strategic foothold just 100 miles from its rival India, akin to how the Soviet Union’s foothold in Cuba raised US blood pressure during the Cold War. Chinese submarines have already appeared there.

But now new details have emerged, including the news that despite ceding the port, Sri Lanka is more indebted to Beijing than ever thanks to the high interest rates on its existing loans. This year, the country owes nearly $13 billion, out of a forecast revenue of less than $14 billion.

Such a vulnerability to global influence is one reason China spent millions in 2015 trying to re-elect the Sri Lankan president, Mahinda Rajapaksa, who signed off on many of those debts, lost his office, and is now plotting a return to power.

A New York Times investigation elaborates on the story of how the port at Hambantota came to be, despite the fact that there was little apparent need for a new working harbor on the small island nation. Instead, the site was chosen because it was the political base of Rajapaksa, who sought a symbolic project to celebrate his greatness.

Rajapaksa’s regime had grown close to China as Sri Lanka faced international isolation at the tail end of a brutal civil war between the government and Tamil insurgents. China continued to provide funds and support for Rajapaksa, and in turn he supported Chinese foreign-policy objectives in the region.

So when he sought to build a port, China was generous, with hundreds of millions of dollars in loans—as long as Chinese companies could build the port, and the comings and goings there could be shared with Chinese intelligence. As the project stretched on, growing increasingly over-budget with little apparent revenue, new loans, with ever-higher interest rates, were needed. The port opened early, in 2010, but there was still a large rock blocking ships from entering that needed to be destroyed—at a cost of $40 million.

Despite China’s spending on the 2015 election, Rajapaksa was pushed out over corruption concerns. But the new government had little choice but to accede to China’s demand to hand over the port in 2018 as the country’s debts worsened. In 2017, it borrowed $1.5 billion from the IMF, but this wasn’t enough—in May 2018, Sri Lanka took a new loan worth $1 billion from the China Development Bank.

Sri Lanka isn’t the only country now fretting about debt to China. The Center for Global Development, a nonprofit research firm, analyzed debt to China that will be incurred while participating in the planned Belt and Road infrastructure investment scheme. It concluded that eight nations could find themselves vulnerable to above-average debt: Djibouti, Kyrgyzstan, Laos, the Maldives, Mongolia, Montenegro, Pakistan, and Tajikistan.

Back in Sri Lanka, the government says that foreign militaries are still forbidden at the Hambantota port. But China’s history of broken promises when it comes to military installations abroad, combined with Sri Lanka’s still-rising debt load, means that any restriction could be temporary.

A new party led by Rajapaksa won local elections in 2018, and while he is prohibited from seeking the presidency again, one of his brothers is seen as a potential candidate for national elections in 2020.