CHICAGO (Reuters) - Cargill Inc [CARG.UL] said on Wednesday it will exit the business of feeding cattle to direct capital toward other investments, the latest transformation for the global commodity trader.

A Cargill logo is pictured on the Provimi Kliba and Protector animal nutrition factory in Lucens, Switzerland, September 22, 2016. REUTERS/Denis Balibouse

Minnesota-based Cargill struck a deal to sell its last two feed yards to ethanol producer Green Plains Inc GPRE.O for $36.7 million, after selling other feedyards to Friona Industries last year, according to the companies.

Cargill’s withdrawal from the feeding business highlights a change in priorities at the company, which says it is the world’s largest supplier of ground beef.

Cargill wants to expand its North America-based protein business by exploring plant-based protein, fish and insects, along with other opportunities linked to livestock and poultry, spokesman Mike Martin said.

The sales of feed yards to Green Plains and Friona frees up hundreds of millions of dollars annually in working capital used to purchase cattle, he said.

Cargill in recent years has refocused its operations by exiting some lower-margin businesses and expanding into higher-margin endeavors such as food ingredients and aquaculture. It sold a U.S. agriculture-retail business to Agrium Inc AGU.TO last year and its U.S. pork assets to Brazilian meatpacker JBS SA JBSS3.SA in 2015.

Other agricultural companies, including U.S. meat processor Tyson Foods Inc TSN.N, have also shifted toward higher margin products to increase profits and distance themselves from gyrations in commodity prices.

“The driver from a Cargill perspective is how they can best deploy capital and they’ve decided not in cattle feeding but in further processing,” said Jim Robb, director of the Livestock Marketing Information Center.

Last year, Cargill bought a ground beef processing plant in South Carolina to target sales to retail and food service customers on the east coat.

Green Plains will supply cattle to Cargill for processing through a multi-year agreement, according to the companies. The two yards it is buying have a capacity of about 155,000 cattle.

The deal will make Green Plains Cattle Company, a subsidiary of the ethanol producer, the fourth largest U.S. cattle-feeding operation, with capacity of more than 255,000 head, according to the company.

By buying the feedyards, Green Plains gains markets for its distiller’s dried grains, an ethanol byproduct used to feed livestock.

“The ability to effectively control our feed supply cost provides our cattle business with a strategic operating advantage,” Chief Executive Todd Becker said in a statement.

The companies said the deal is expected to close by the end of May.