India imposed a 40% levy on the export of onions as Prime Minister Narendra Modi escalates efforts to bridle inflation ahead of key elections.

The export tax will be effective immediately and continue through the end of the year, according to a notification by the country’s finance ministry on Saturday. The measure is expected to improve domestic availability of the vegetable.

India’s inflation has surged to a 15-month high, building urgency for the government to take measures to contain spiraling food prices. Modi in a speech to the nation on Aug. 15 vowed to fight inflation as he prepares to return to office for a third term in national elections next year.

Prices of onion, as ubiquitous as spices in Indian cooking, have been at the epicenter of national politics and have been blamed for bringing down governments in the past and could put Modi in a tight spot.

Retail prices of onions were at 35 rupees (42 cents) a kilogram in Delhi on Friday, an increase of about 17% from Jan. 1, according to data compiled by the food ministry. The national average was 30.5 rupees that day.

The government has already taken steps to contain a surge in food prices. Earlier, after a ban on wheat exports in 2022, the government curbed shipments of some rice varieties last month. It is also considering abolishing 40% import tax on wheat to cool domestic prices.