Minnesota's multinational businesses with interests in Ukraine and Russia scrambled Thursday to connect with their people on the ground as war broke out.

The threat of violence loomed over the region for weeks, but the scope and speed of the attack took many by surprise, forcing U.S. companies — including Medtronic, Ecolab and Cargill — to make fast decisions as the situation quickly deteriorated.

"Right now, our priority is the safety of our people in the region. This is a rapidly evolving situation with a great deal of uncertainty," said April Nelson, a Cargill spokeswoman, in an e-mail. "We are currently gathering information and assessing potential impacts to Cargill and our customers."

Minnetonka-based Cargill has 500 employees in the country. It sent many people home and told others not to come in to work Thursday so they, like all Ukrainians, could try to secure a safe location for themselves and their families.

A shipping vessel chartered by Cargill Inc. was struck by a missile early in the day as it was leaving a strategic Black Sea port on Ukraine's southern border.

The entire crew is safe and accounted for and the ship was rerouted to Romania to undergo further inspection, Cargill said.

Cargill owns a majority stake in a deep-sea port on the outskirts of Odessa where it runs a major export operation sending grains and oils around the world. That port, along with several other Ukrainian commercial ports, closed Thursday.

All of Cargill's operations were running as usual Wednesday — pressing grain into cooking oil, processing wheat, corn and soybeans, and sending ships full of food ingredients to sea. But Russia's all-out invasion Thursday flipped a switch on life in Ukraine as attacks came by air, land and sea.

Cargill immediately implemented its contingency plan that had been prepared in case of attack. Often called a "business continuity" plan in industry parlance, Cargill's plan is focused on ensuring its global customers still have access to foodstuffs.

The Minnesota agribusiness is one of the world's largest commodities traders with an outsized role in the global food supply chain. And Ukraine is a critical player, often called the breadbasket of Europe for its significant agricultural output.

Ukraine and Russia account for nearly one-third of all global wheat exports. The turmoil prompted Chicago wheat prices to rise to their highest level in nine years on Thursday. Other commodities also rose since the region is a major exporter of sunflower oil, corn and soybeans.

Executives at Cargill's Minnetonka headquarters scrambled Thursday to gather information on its operations scattered across Ukraine as well as ensure the safety of hundreds of employees in the besieged nation.

Other Minnesota companies were also piecing together the situation on the ground through accounts from colleagues there.

Inver Grove Heights-based CHS Inc. said it has been "drawing down" its commodities inventory in Ukraine.

"We remain focused on the safety of our 46 employees in the region and continue to maintain close communications," CHS said in a statement. "We have been drawing down our export activity in Ukraine for the last few weeks as part of our business continuity planning."

Medtronic, which is operationally-based in Fridley, said its global security team was in touch with its 40 employees in Ukraine's capital city of Kyiv and 240 staff members in Moscow, providing assistance where needed.

Every U.S.-based corporation is trying to figure out what Western sanctions will mean for their operations in Russia.

"We are closely following the developments and are evaluating the effects of the sanctions as they are issued," said Erika Winkels, a Medtronic spokeswoman. "The situation is changing rapidly. We will follow legal requirements while doing our best to mitigate impacts on patients."

Ecolab said its small team in Ukraine has been on high alert for many weeks, creating various plans depending on the degree of escalation in the conflict.

On Thursday, the company said, "[We] have encouraged them to do what is needed to protect themselves and their families. Our hope is that our associates will remain safe and peace quickly returns to the region."

Maplewood-based 3M, which has offices in Kyiv, Moscow and two production plants in Russia, echoed this sentiment about its employees' safety.

Other Minnesota manufacturers with offices in Ukraine — including Minneapolis-based SPS Commerce and Blaine-based Crown Iron Works — did not respond to a request for comment.

Star Tribune staff writers Burl Gilyard, Brooks Johnson and Patrick Kennedy contributed to this report.