Sri Lanka has jailed a man for three weeks after he admitted to hoarding four litres of petrol during a nationwide fuel shortage triggered by the Middle East war, Reuters reports, citing local media.

The 48-year-old man initially said the fuel was for his lawnmower.

A magistrate in Nikaweratiya, 125 kilometres northeast of the capital Colombo, also imposed a fine of 1,500 rupees ($5), according to the Lankadeepa daily newspaper.

It added that the man had been charged with hoarding petrol and trying to sell it on the black market at a time when authorities had imposed fuel rationing.

Motorists on the South Asian island are currently receiving fuel every other day.