India banned wheat exports on Saturday, just days after saying it was targeting record shipments this year, as a scorching heat wave curtailed output and domestic prices soared to an all-time high.

The government said it would still allow exports backed by already issued letters of credit and to those countries that request supplies "to meet their food security needs."

Global buyers were banking on supplies from the world's second-biggest wheat producer after exports from the Black Sea region plunged following Russia's invasion of Ukraine in late February. Prior to the ban, India had aimed to ship a record 10 million metric tons this year.

Although it is not one of the world's top wheat exporters, India's ban could drive global prices to new peaks given already tight supply, hitting poor consumers in Asia and Africa particularly hard.

"The ban is shocking," a Mumbai-based dealer with a global trading firm said. "We were expecting curbs on exports after two to three months, but it seems like the inflation numbers changed the government's mind."

Rising food and energy prices pushed India's annual retail inflation up toward an eight-year high in April, strengthening economists' view that the central bank would have to raise interest rates more aggressively to curb prices.

Wheat prices in India have risen to record high, in some spot markets to as high as 25,000 rupees ($322.71) per ton, versus government fixed minimum support price of 20,150 rupees. Rising fuel, labor, transportation and packaging costs are also boosting the price of wheat flour in India.

"It was not wheat alone. The rise in overall prices raised concerns about inflation and that’s why the government had to ban wheat exports,” said a senior government official who asked not to be named as discussions about export curbs were private.

"For us, it’s abundance of caution,” he said.

Earlier this week, India outlined its record export target for the 2022-23 fiscal year that started on April 1, adding it would send trade delegations to countries such as Morocco, Tunisia, Indonesia and Philippines to explore ways to further boost shipments.

But a sharp and sudden rise in temperatures in mid-March means the crop size could be smaller than expected at around 100 million tons or even lower, a New Delhi-based dealer with a global trading firm said. The government had estimated production would hit an all-time high of 111.32 million tons.

"The government's procurement has fallen more than 50%. Spot markets are getting far lower supplies than last year. All these things are indicating lower crop," the dealer said.

Cashing in on a rally in global wheat prices after Russia invaded Ukraine, India exported a record 7 million tons of wheat in the fiscal year to March, up more than 250% from the previous year.

"The rise in wheat price was rather moderate, and Indian prices are still substantially lower than global prices," said Rajesh Paharia Jain, a New Delhi-based trader.

"In fact, wheat prices in some parts of the country had jumped to the current level even last year, so the move to ban export is nothing but a knee-jerk reaction," he added.

Despite a drop in production and government purchases by the state-run Food Corporation of India (FCI), India could have shipped at least 10 million tons of wheat this fiscal year, Jain said.

The FCI has so far bought a little over 19 million tons of wheat from domestic farmers, against last year’s total purchases of a record 43.34 million tons. The FCI buys grain from local farmers to run a food welfare program for the poor.

Unlike previous years, farmers have preferred to sell wheat to private traders, who offered better prices than the government's fixed rate.

In April, India exported a record 1.4 million tons of wheat and deals were already signed to export around 1.5 million tons in May.

"(The) ban will lift global wheat prices. Right now there is no big supplier in the market," another dealer said.