Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Emergency crews raced Thursday morning to free the remaining miners trapped in an elevator more than 70 stories below ground in upstate New York, officials said.

By 8:40 a.m. ET, the 17 men were hoisted to safety following the "major rescue" over nearly 11 hours at the Cargill Salt Mines in Lansing.

The workers had been trapped in an elevator about 800 to 900 feet down an access shaft, the company said. Ultimately, the mine shaft itself plunges about 2,300 feet — the deepest salt mine in North America.

All 17 #Cargill Miners are now out! All are safe! — Tompkins DoER (@TompkinsDoER) January 7, 2016

Shawn Wilczynski, Cargill's mine manager, said at a news conference that the miners had just started their shift late Wednesday when a steel beam linked to the two-level elevator appeared to break, halting operations.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A crane was brought in to assist with extricating the workers, according to the Tompkins County Department of Emergency Response. It said the trapped workers were given radios and supplies.

Wilczynski said the men, ranging in ages from their 20s to their 60s, stayed positive. "As is typical with them, (they were) joking, sharing stories, having a good time with each other," he added.

Mark Klein, a spokesman forCargill, said earlier that no one was injured when the incident occurred around 10 p.m. ET.

The last miners are rescued via a basket lifted by a large crane at the Cargill Salt Mine in Lansing, New York, on Jan. 7, 2016. ITHACA FIRE DEPARTMENT

The company was in "constant contact" with the 17 and rescue teams were able to give the stranded workers water, he added.

Klein said that once a crane arrived, it lowered down a basket to carry out miners two to three at a time.

The elevator was equipped with safety brakes to hold it in place, and the cause of the malfunction is under investigation, he added.

Cargill purchased the mining rights in 1970 to what was previous Cayuga Rock Salt's site.

The mine employs around 200 people and mostly makes road salt but is also under the Diamond Crystal name as residential de-icing salt, according to Cargill.

Wilczynski said operations at the road salt mine will cease temporarily.

"We’ll take whatever time is necessary and we will not go back to any mode of operation until our infrastructure is back to 100 percent of our high safety standards," he said.

He added that the warmer winter in New York has already kept Cargill's operations at a slower pace.

New York Gov. Andrew Cuomo said Thursday that a state investigation is underway to ensure that the incident "is not repeated in the future."