Several Olympic events were in danger of being canceled due to a shortage of salt

Building and maintaining courses for many winter sports requires many things. One of those things is salt. Lots and lots of salt.

According to The New York Times, Olympic officials knew this. Hans Pieren, “one of the world’s leading experts on salt and snow” told Sochi officials that the Alpine skiing events “required more than 19 tons of salt." But they didn't listen, and many events were in danger of being canceled. All because of salt.

Top winter sports officials held an “emergency meeting” last week looking for ways to obtain tons of sodium chlroride. They needed to act quickly.

Then this happened.

Per the Times:

Tim Gayda, a Canadian consultant who works as a senior adviser to the Sochi organizers, called the meeting Thursday night, according to some people who were there. He told the group that the strongest kind of salt, the large-grain variety, was simply not available in Russia. Mr. Gayda asked the group an urgent question: Does anyone know how we can get 25 tons of salt — tonight?

From there, a confidential international mission unspooled — a mountaintop “Ocean’s Eleven” — that just might have prevented a major Olympic embarrassment. This Sochi salt accord involved a Swiss salt salesman working late into the night, a rerouted airplane that may or may not have come from Bulgaria, a former Olympian turned salt savant and Russians powerful enough to clear months of customs bureaucracy overnight.

[Related: Mayhem at women's super-G course]

Here’s how it went down.

Pieren, a 52-year-old former Swiss skier who competed in the ’88 and ’92 Games, told Sochi organizers how much salt would be necessary, but Sochi organizers, who had already spent roughly $50 billion on the Games, opted not to fill Pieren’s order that he placed on Sept. 29.

As temperatures in Sochi rose, the snow became softer and softer and Sochi had “less than a ton” remaining of the large crystals needed to harden the snow. The conditions worsened beyond just the Alpine course, too. The cross-country, halfpipe and Nordic combined courses all needed treatment.

Pieren reached out to Schweizer Rheinsalinen, a 160-year-old company in Switzerland, and told them that “Olympic officials would buy 24 tons” of big-grain salt “if it could be shipped immediately.” The company had plenty of big-grain salt available in a nearby warehouse and the sale was approved.

From there, a plane was rerouted to Zurich and Marcel Plattner, a sales accountant with the company, made the arrangements so the salt got on the plane. The plane landed in Sochi and passed through a security check on the same day. The load of salt was taken straight to the mountain and even though problems continued with the course on Saturday, Pieren said the worst was behind them.

After this whole ordeal, it should be safe to say that there will be plenty of salt available for the 2018 Games in Pyeongchang.

More Winter Olympics coverage from Yahoo Sports: