Cash-strapped Sri Lanka signed a deal on Monday allowing a Chinese company to enter the island's domestic fuel market in competition with an Indian oil firm and a local state-owned retailer.

The agreement makes China's Sinopec the first newcomer in the Sri Lankan market in 20 years, and follows months of fuel rationing triggered by a foreign exchange crisis that choked off imports last year.

President Ranil Wickremesinghe's office said he witnessed the signing of the agreement with Sinopec, adding that it "marks a crucial step in ensuring a steady and uninterrupted fuel supply for the nation".

Shortages of fuel and other essentials such as food and medicines led to months of protests that culminated with the toppling of former president Gotabaya Rajapaksa last year.

At the height of the crisis, the shortages were such that motorists had to queue for days to fill their tanks.

Energy minister Kanchana Wijesekera said on Monday that Sinopec would be handed 150 pumping stations currently under the state-owned Ceylon Petroleum Corporation (CPC).

The new agreement will grant Sinopec a licence to operate in the island for 20 years, and allow it to invest in the setting up of another 50 retail stores, Wijesekera said.

The government in March approved in principle the entry of Chinese, Australian and US oil giants into the local retail market, with Sinopec the first off the block.

The decision sought to end a 20-year duopoly enjoyed by CPC and the Indian Oil Corporation -- the first foreign operator allowed into the market since Sri Lanka nationalised petroleum companies 60 years ago.

Officials said private companies will have to finance the import of oil from their own foreign exchange reserves and agree to retain their profits in Sri Lanka for at least a year.

Sri Lanka has raised fuel prices threefold in the past year to offset huge losses at CPC, which is set to undergo restructuring in line with a $3 billion IMF bailout Colombo secured in March after a lengthy stretch of economic turmoil.