HAMBANTOTA, Sri Lanka A South Korean ship unloads its cargo of cars at the Hambantota port, the only sign of life at Sri Lanka's newest harbor on its southern coast. The rest of this $1.4 billion port, built with a loan from the Export-Import Bank of China, sits idle. Weeds are spreading and visitors to the port's administrative offices must tiptoe around feral dogs.

Emptiness has dogged the port since it opened in 2012. Only a handful of car carriers drop anchor each week. The ruling coalition government, led by President Maithripala Sirisena, says the port is a "white elephant" left by the previous regime, led by the autocratic former President Mahinda Rajapaksa. Mounting operating losses, estimated at $235 million, deepen the impression that the Magampura Mahinda Rajapaksa Port was a Rajapaksa vanity project.

The ruling coalition wants to end this drain on the economy. The cabinet has just endorsed a public-private partnership agreement with state-backed China Merchants Port Holdings, which will take an 80% debt-for-equity stake in a joint venture that will run the 1,500-hectare port. The government is hoping to recover $1.12 billion over the course of the 99-year lease, and will look for more Chinese cash if plans are approved for a 6,000-hectare special industrial zone on an adjacent site.

The Chinese government is strongly supportive of the port, which Beijing sees as part of its ambitious Belt and Road Initiative. "We want to help Sri Lanka build a transport hub and a logistics center," said Qiu Xinli, chief of the political section at the Chinese embassy in Colombo. "It is a good project, no matter which government is in power in Sri Lanka."

For Sri Lanka, giving a new lease on life to the Hambantota port is a big step toward building a maritime economy. But it is also a crucial element in the government's attempts to build up its depleted foreign reserves in the face of a looming debt repayment crisis.

By 2019, the country needs to repay $3.99 billion to foreign creditors. Foreign reserves fell to $4.23 billion in November 2016, according to the International Monetary Fund, which warned after a visit to Sri Lanka in March of impending repayment problems.

"MAJOR PLUS" Indrajit Coomaraswamy, governor of the central bank, regards the Hambantota deal as a "major plus" for reserves. "This year, at least, we could get $400 million if the deal goes through," he said. A member of the bank's monetary board echoed this sentiment: "The government wants to look at this transaction to address some of the broader macroeconomic issues, so the deal is not just about the port."

Coomaraswamy has set his sights on increasing Sri Lanka's foreign exchange reserves to $7.5 billion by the end of this year, part of which will be achieved through a planned $1.5 billion sovereign bond issue and a $700 million syndicated loan.

By February, the reserves recovered to $5.6 billion, according to the central bank, but Sri Lanka will require $7 billion by 2019 to cover loans and bridge rising fiscal deficit. According to the IMF, total external and domestic public debt amounted to 76% of gross domestic product at the end of 2015, the latest figures available. About $8 billion is owed to China for loans secured by the Rajapaksa regime between 2005 and 2015. The loans, written at commercial interest rates, funded a raft of infrastructure projects, including the Hambantota port.

The depth of Sri Lanka's looming economic crisis is illustrated by the deteriorating trade deficit, which grew from $8.4 billion in calendar 2015 to nearly $9.1 billion in 2016, according to the central bank. Earnings from Sri Lanka's narrow export base, largely in garments and tea, fell 2.2% in 2016 from the previous year, while imports rose 2.5%.

Sri Lanka's current account is likely to record a surplus for the year thanks to tourism earnings, which rose 18% to $3.5 billion, and remittances from workers in the Middle East and other parts of Asia, who sent home $7.2 billion, a slight increase from the previous year.

But the coalition government has had to stomach bad news about foreign direct investment. FDI inflows plunged 34% to $444.5 million in 2016 from a year ago.

AIR OF UNCERTAINTY Indeed, Sri Lanka's FDI record was far below Vietnam's and Myanmar's in 2015.

Nature has not spared the island, either. The worst drought in decades during the main rice cultivation season cut the 2017 harvest by 53% to 1.82 million tons -- a severe blow given that agriculture contributes 9% of gross domestic product and employs 28% of the labor force. The department of census and statistics said in March that the drought -- and the severe floods that preceded it -- would cut GDP growth to 4.4% for 2016, compared with 4.8% the previous year. The government had to dip into its depleted foreign reserves to import rice from Asian neighbors.

The fragility of the economy has been highlighted by the IMF, which approved a $1.5 billion loan to Sri Lanka last year to stave off a crisis. "A more prolonged drought could raise food and oil imports with adverse impact on growth, inflation and the balance of payments," said Jaewoo Lee, head of the IMF mission to Colombo in March. But Lee kept the Sri Lanka government guessing over the release of the $119.9 million third tranche of the loan, due to be transferred in April.

"Having an IMF program is the equivalent of being in hospital," Coomaraswamy said in January. "We are not in the ICU [intensive care unit] but clearly in the hospital."

The government's efforts to balance the books resulted in an upgrade by credit ratings agency Fitch, which in February revised Sri Lanka's credit outlook from negative to stable, and confirmed the country's B+ sovereign credit rating.

Fitch praised the government for pushing ahead with IMF prescriptions, including raising value-added taxes and reducing public spending to cut the budget deficit, which dropped from 7.4% of GDP in 2015 to 5.6% in 2016. There is new pressure, however, to reduce the fiscal deficit to 3.5% by 2020.

The government is also pushing ahead with restructuring state-owned enterprises despite the risk of a political backlash. It announced in late March the first steps toward the privatization of "strategic assets" such as Ceylon Petroleum Corp., the Ceylon Electricity Board, the Sri Lanka Ports Authority and Sri Lankan Airlines.

Finance Ministry officials have also discussed the sale of "nonstrategic assets" ranging from a five-star hotel to a hospital. But will the government stay the course? It may have little choice, given the depleted foreign reserves and ticking debt clock. The Hambantota port deal has surfaced as a gauge of whether it will be possible to unload more debt-ridden state assets for dollars. No wonder, at some seminars in Colombo, speakers give the impression that the country is facing an "SOS moment."