Trading giant Marubeni Corp. expects to get as much as ¥400 billion ($3.51 billion) from selling the grain business of its U.S. unit Gavilon Agriculture Investment Inc. to Viterra Ltd.

Marubeni will transfer shares of Gavilon to Viterra following a reorganization of Gavilon’s structure, the Tokyo-based company said in a statement on Wednesday. While the price will be determined later, Marubeni said it expects to receive ¥300 billion to ¥400 billion of funds from the sale, including the collection of loans.

Viterra said in a separate statement that the agreed purchase price is $1.125 billion, plus working capital.

The decision is made after considering the "uptrend in the grain supply industry,” Marubeni said. The company saw an opportunity to transfer Gavilon’s grain business on "appropriate terms” and assessed that it would be able to maximize its own consolidated asset value, it added.

Crop markets have been on a tear, with the Bloomberg Agriculture Spot Index near the highest level since 2012. Bad weather has hit harvests and China has bought huge quantities of the world’s crops to feed its hog herd, while soaring freight costs and labor shortages have roiled the food supply chain. An energy crisis has also caused a dramatic surge in fertilizer bills for farmers globally.

The deal, subject to closing conditions and regulatory approvals, is expected to close by March 31, 2023.

Besides its main U.S assets, Gavilon also has operations in Mexico, South America, Europe and Asia.

For Marubeni, the sale will mark the end of a painful journey as it booked a series of impairment losses, totaling ¥120 billion, since buying Gavilon for $2.7 billion in 2013, due to weaker grain prices and market volatility.

"Our initial goal was to become a global grain major like Archer Daniels Midland Co. and Cargill by expanding trade volume, but the strategy didn't work as bigger volume posed higher market risk," Akira Terakawa, senior executive vice president at Marubeni, told a news conference.

"We have struggled also as our acquisition price was too high," he said, adding that the Gavilon grain business was not easily controlled by the Japanese managers.

Large Western grain trading houses, including ADM, Cargill and Louis Dreyfus Co., which battled years of global oversupply and thin margins, have seen their fortunes turn during the COVID-19 pandemic as governments and food companies rushed to stockpile.

Before the sale, Marubeni will reorganize its group operations, including a transfer of eight of the grain elevators held by Gavilon in the northern United States to Columbia Grain International (CGI), another U.S.-based Marubeni unit.

Other steps include a transfer of part of the interest of a joint venture export terminal business on the U.S. West Coast that is held by Gavilon to CGI, and a transfer of Gavilon's fertilizer business to Marubeni.

Despite the sale, Marubeni is looking to further strengthen its grain business to meet demand for grain in Asia, especially Japan, while reinforcing the handling of specialty crops and developing its processing and downstream businesses, it said.