The Little Hearts maker has been focusing more on reducing product damages during transport, ensuring trucks are more fully loaded and setting up new plants.

Prices of raw materials including palm oil, laminates and corrugated boxes have also come off their highs, setting up Britannia for gross margin expansion that "surprised positively", JM Financial analyst Richard Liu said.

For the second quarter ended Sept. 30, Britannia's gross margin was at 42.9%, up from 41.9% in the first quarter and 38.9% a year earlier, according to LSEG data.

However, Britannia Managing Director Varun Berry stopped short of forecasting third-quarter margins on an earnings call on Thursday.

"The Middle East (is) in flames and Russia and Ukraine (are) going at each other. We don't know where this situation is leading up to."

Oil prices have risen roughly 6% since the start of the Israel-Hamas war, whose escalation may require policymakers in developing countries to take steps to manage a potential increase in headline inflation, the World Bank said earlier this week.

Analysts, however, expect Britannia to weather commodity price increases with effective cost-cutting measures.

Britannia also topped second-quarter earnings estimates on new biscuit launches and its move to ramp up distribution including in rural centres.

However, Britannia will now need to fend of competition from smaller rivals who have now re-entered the fray for market share.

Britannia shares, set to end higher after three sessions of losses, are on track for their best day in nearly five months. The stock has climbed about 5% this year, underperforming the Nifty fast-moving consumer goods index's 16% rise.

(Reporting by Praveen Paramasivam in Chennai)

By Praveen Paramasivam