As recently as the 1990s, China’s and India’s trade with four South Asian nations  Sri Lanka, Bangladesh, Nepal and Pakistan  was roughly equal. But over the last decade, China has outpaced India in deepening ties.

For China, these countries provide both new markets and alternative routes to the Indian Ocean, which its ships now reach through a narrow channel between Indonesia and Malaysia known as the Strait of Malacca. India, for its part, needs to improve economic ties with its neighbors to broaden its growth and to help foster peace in the region. Some of the shift in trade toward China comes from heightened tensions between India and Pakistan, which has hampered trade between the two countries. But China has also made inroads in nations that have been more friendly with India, including Sri Lanka, Bangladesh and Nepal.

Moreover, protectionist sentiments have marred India’s relationships with its neighbors. South Asia has a free-trade agreement, but countries that are part of the pact get few benefits, economists say, because India and its neighbors refuse to lower tariffs on many goods and services to protect their own businesses. By contrast, the countries of Southeast Asia have minimal or no duties on most goods and services that they import from one another.

India has had some success in establishing closer ties with Sri Lanka, with which it has a strong bilateral trade agreement. But China has become a partner of choice for big projects here like the Hambantota port. China’s Export-Import Bank is financing 85 percent of the cost of the $1 billion project, and China Harbour Engineering, which is part of a state-owned company, is building it. Similar arrangements have been struck for an international airport being built nearby.

Sri Lankan officials want to turn Hambantota, which was devastated by the 2004 tsunami and is the home constituency for President Mahinda Rajapaksa, into the second-largest urban area in the country after the capital, Colombo. (It is the ninth-biggest today.) The government is also building a convention center, a government complex and a cricket stadium.

Sri Lanka needs foreign assistance to make those dreams a reality, because the government’s finances are stretched by a large debt it accumulated in paying for a 25-year civil war that ended in May. In 2009, the country borrowed $2.6 billion from the International Monetary Fund.