Dramatic video of a tornado swirling through a North Dakota trailer park on Monday has gone viral, with viewers marveling at how close the twister came to Dan Yorgason and his friend Abram Schiff.

An EF2 tornado, with winds that peaked at 120 miles an hour, struck western North Dakota near Watford City, where the trailer park is located, on Monday evening, the National Weather Service reports.

Although Yorgason and Schiff—oil industry workers whose stunned reactions could be heard on the video—escaped unscathed, the storm injured nine people, destroyed more than a dozen trailers, and damaged others.

Yorgason shot the video, above, and posted it on YouTube, where it has been viewed nearly a million times. "Dude, where do we go?" Schiff asks as the tornado comes uncomfortably close. "We have nowhere to go." (See "Storm Chaser Tim Samaras: One Year After His Death, His Gift Is Unmatched.")

The massive twister appears right overhead, with debris swirling around its margins. The two friends retreat to a truck, where they continue filming.

Charlie Neese, a tornado safety expert and meteorologist with TV affiliate WTVF in Nashville, Tennessee, says the men “were in grave danger.”

“They were very, very lucky they were not pulled into it,” Neese says. Had the storm been a mere 50 or 100 feet (15-30 meters) closer, he says, Yorgason and Schiff could have been drawn into the swirling winds.

The best way to ride out a tornado: Seek shelter in the sturdiest building possible, as low as possible, away from windows and doors. But if a mobile home is all that’s available, Neese says, it’s best to go outside, crouch in a ditch—if you can get there before the storm arrives—and cover your head.

If none of that is possible and there’s time before the tornado nears, Neese advises getting into a vehicle, since it may provide more protection than a trailer. And if roads are clear, he advises driving as close as possible to a 90-degree angle away from the tornado’s approach.

In the comments posted with the YouTube video, Yorgason wrote that he and Schiff hadn't had time to grab their shoes, and they didn't think they could drive away because the only road was blocked by the tornado.

"The laughter [heard in the video] was sheer panic and nerves," he wrote.

Understanding Tornadoes

Tornadoes form from supercell thunderstorms.

For such a storm to form, it requires "the ingredients for a regular thunderstorm," says Harold Brooks, a research meteorologist with the National Oceanic and Atmospheric Administration's (NOAA) National Severe Storms Laboratory in Norman, Oklahoma.

Those ingredients include warm moisture near the surface and relatively cold, dry air above. "The warm air will be buoyant, and like a hot-air balloon it will rise," says Brooks.

A supercell requires more: winds that increase in strength and change direction with height. "Then the updraft tends to rotate," Brooks says, "and that makes a supercell."

The supercell churns high in the air and, in about 30 percent of cases, leads to the formation of a tornado below it. This happens when air descending from the supercell causes rotation near the ground. (See "How Scientists Hope to Improve Tornado Forecasting.")

Even then, "we still don't know why some thunderstorms create tornadoes while others don't," tornado chaser Tim Samaras said in early 2013.

Samaras was a scientist and National Geographic grantee who was killed by a twister on May 31, 2013, in El Reno, Oklahoma. (Read "The Last Chase" in National Geographic magazine.)

Brooks says scientists believe strong changes in winds in the first kilometer (half a mile) of the atmosphere and high relative humidity are important for the formation of tornadoes. He adds that there needs to be a downdraft in just the right part of the storm.

Tornado formation also requires a "Goldilocks" situation, in which air must be cold but not too cold. It should be a few degrees more frigid than surrounding air, Brooks says.

"We don't understand how tornadoes die," he says. "Eventually the air gets too cold and it chokes off the inflow of new air into the storm, but we don't know the details."