Indonesia began imposing a complete ban on palm oil exports on April 28, as the world’s largest producer of the commodity risked destabilising a global vegetable oil market already hitting peak prices.

The archipelago nation is facing a shortage of domestic supplies of cooking oil and soaring prices, with consumers in several cities having to wait for hours in front of distribution centres to buy the essential commodity at subsidised rates.

Authorities in Southeast Asia’s most populous country fear the scarcity and rising costs could provoke social tensions and have moved to secure supplies of the product, which is used in a range of goods such as chocolate spreads and cosmetics.

In a last-minute reversal late on April 27, they clarified the embargo would include all exports of the oilseed and not only products intended for edible oils, as indicated a day earlier.

“All products”, including crude palm oil, “are covered by the Ministry of Trade regulation and will be enforced”, said Coordinating Minister for Economic Affairs Airlangga Hartarto.

President Joko “Jokowi” Widodo said supplying the country’s 270 million residents was the “highest priority” of his government.

“As the world’s largest palm oil producer, it is ironic that we are having difficulties getting cooking oil,” he said.

Indonesia produces about 60 per cent of the world’s palm oil, with one-third consumed by its domestic market. India, China, the EU and Pakistan are among its major export customers.

The months-long shortage has been exacerbated by poor regulation and producers who are reluctant to sell at home because high international prices have made exports more profitable.

Jakarta plans to resume exports when the price of bulk cooking oil in local markets has fallen to 14,000 rupiah ($0.97) per litre, having rocketed 70 per cent in recent weeks to 26,000 rupiah.

Vegetable oils are among a number of staple food items that have seen prices hit record highs in recent weeks, after Russia began its military offensive against agricultural powerhouse Ukraine, according to the UN Food and Agriculture Organisation.