When Jeff Nichols began writing “Take Shelter,” his prize-winning selection at this year’s Cannes Film Festival, the young, recently married director was enjoying a banner year. It was 2008, just weeks after his movie debut “Shotgun Stories” opened to critical acclaim, and he was content with his career and his family.

But something was amiss.

“Anxiety is having something to lose,” he says, reflecting on the uncertainty that permeates “Shelter,” his searing family drama, opening Friday, about a father tortured by visions of an apocalyptic storm. “I had a nagging feeling that the world was heading for harder times.”

Nichols invested his misgivings in Curtis LaForche, the working-class provider, played by Michael Shannon, who obsessively prepares for the oncoming tempest by fortifying a bunker to protect his wife and child.

In the movie, the storm serves as both a real physical threat and a metaphor for common concerns about America and life in general.

Nichols, 32, describes “Shelter” as his search for an answer to those fears, but admits there’s no quick fix on the horizon. “If Curtis makes any mistake, it’s his initial failure to share his anxieties with his wife,” he says. “The solution comes when he lays that stuff on the table. It’s not a cure, necessarily, but it makes things easier.”

If that makes the movie sound like a personal exploration, it didn’t start out that way.

Nichols admits that, for practical reasons, he needed something he could use to cut a marketable trailer — in this case, dark clouds blotting out the sun, teeming downpours and jagged lightning. He envisioned a mainstream thriller, slyly infused with “indie elements,” which he defines in this case as slow-burning emotion.

It was when he started creating characters who make critical choices that marriage became the heart of the story. He still needed special effects, and he needed Shannon, who gave him the unpredictability he wanted to make Curtis a wild card, despite his devotion to family.

However “Shelter” is received, Nichols is confident he has stayed true to the vision he hopes will become his career’s hallmark. “I don’t want to make hopeless films,” he says. “Sure, I could just sit around, watch FOX News and write about all the bad things in the world. It’s impossible not to internalize that stuff.

“Some people will interpret the movie’s ending as bleak. That’s fine, but that’s not where I’m coming from. There is hope, and I see the movie as an expression of that.”IF YOU GO