Sometime in the 1940s, the New River Coal Company held a contest to see which of the families living in its company housing could grow the prettiest garden.

The company distributed seeds and then sent out a clerk armed with a color 16 mm camera to film footage of the gardens and the people who grew them. The footage was likely shown in local theaters or the company store. After that, it was mostly forgotten, until documentarian Elaine McMillion Sheldon and her team found and included it in the new film “King Coal.”

Sheldon’s documentary work has received its share of recognition — Netflix deals, a pair of Emmys, a Peabody Award, an Oscar nomination, premieres at film festivals including Sundance and Telluride. But she does not call her latest film a documentary. She calls it a fable.

That’s because the titular figure of the film, King Coal, is a personification. Like Uncle Sam representing United States patriotism, King Coal represents the industry that has held Appalachia in its grip for more than a century.

While the king is not real in a flesh-and-blood way, he still manages to haunt every frame of Sheldon’s film.

The color footage of coal camp flower gardens represents the heyday of the king’s regime. But color quickly changes to black-and-white as Sheldon shows archival footage of the Mingo Oak. In the late 1930s, it was the oldest and largest white oak tree in the world. We watch as men cut the tree down, saw it into massive chunks and haul those chunks away on trucks.

“The king’s men said a fungus killed her,” Sheldon intones in her narration of the film. “The people who gather on her dying day know otherwise. She suffocated from the fumes of a burning coal waste pile.”

King Coal encouraged his people to plant flowers. He also killed the Mingo Oak.

“For some, the king has provided. For some, he’s stolen,” Sheldon says elsewhere in her narration, sounding like the book of Ecclesiastes. “For some, he’s given pride. For others, shame.”

It reminds me of a story I heard growing up in the church. After the children of Israel finally arrive in the promised land, they are ruled by judges. But in the eighth chapter of the book of 1 Samuel, the people are ready for regime change. “Give us a king to govern us,” they demand from the aged prophet Samuel.

God is offended by the people’s request, but he tells Samuel to grant it. First, though, he instructs the prophet to issue a stern warning about what serving an earthly king will be like. Their sons will become foot soldiers and horsemen, sent to fight whatever battle the king should wage. Their daughters will become perfumers and cooks and bakers. The king will take their crops, their land, their livestock, their servants.

“You shall be his slaves,” the prophet tells the people. “And on that day you will cry out because of your king, whom you have chosen for yourselves, but the Lord will not answer you on that day” (1 Samuel 8:17-18 NRSVue).

The people are not deterred. “We are determined to have a king over us,” they say, “so that we also may be like other nations and that our king may govern us and go out before us and fight our battles” (vv. 19-20).

Israel receives its king just two chapters later, when Samuel pours oil on the head of Saul the Benjamite. And almost immediately, Samuel’s prophecy begins to come true.

His prophecy still holds true, for kings both real and imagined.

“The film is not without its own exploration of religion,” Sheldon said in a recent interview.

In her narration, Sheldon ponders whether King Coal is alive or dead or somewhere in between — a ghost. And if he’s a ghost, is he trapped in the mountains he once ruled?

“When I was making the film, I was thinking a bit about rituals and grieving and all the things we do to figure out what our purpose is,” she said. “How we let something go.”

Sheldon’s grandfather, a former coal miner and gravedigger, shows up in the film to demonstrate traditional Appalachian burial rites. When a loved one dies, you stop the clocks and open the windows. You turn the mirrors to face the wall.

These traditions have largely fallen out of practice. But watching the film, I wondered whether maybe we should bring them back. There are so many ghosts trapped here.

My own grandfather suffered a broken back and broken legs in two separate underground accidents but each time returned to the mines after his injuries healed. One of my earliest memories is seeing him emerge from his blue Chevy pickup, face still black with dust.

It was the dust that finally kept him aboveground. He was diagnosed with black lung disease when I was a toddler. For the next 20 years, I watched the disease slowly strangle him to death.

A few years ago, one of my cousins died in an underground accident, leaving behind five children and a wife. A deacon in my church lost the use of his legs after a mine collapse. Another church member died in the 2010 explosion at the Upper Big Branch Mine — a disaster I covered as a young newspaper reporter.

I’ve lost even more friends to Appalachia’s opioid crisis, which was largely caused by King Coal’s downfall. Pharmaceutical companies saw opportunity in a region plagued by workplace injuries and economic despair — pumping millions of pain pills into the region and paving the way for a heroin epidemic.

Samuel was right. King Coal, like all the kings before him, takes sons and daughters whenever he pleases, with no thought of the families left behind.

There is one thing Samuel neglected to mention to the people, though. No monarch’s reign can last forever. No matter how powerful a king might become, his rule will someday come to an end. Someone new will take the throne.

King Coal is certainly in decline. The industry employs far fewer coal miners than it did during its peak in the mid-20th century. Coal-fired power plants are going offline as renewable energy becomes more efficient, affordable and available.

But this just raises one more problem with kings. When your society rests on one person — or, in Appalachia’s case, one industry — what do you do when that foundation is removed? There is no heir apparent for King Coal.

“Who are we without a king?” Sheldon’s narration asks.

Her film does not attempt to answer this question. But it does provide Appalachia the first step to finding closure — by giving King Coal a funeral.

This is another part of Sheldon’s fable. The scene is staged but not scripted. Sheldon and her team created the scenario and told participants to do what came naturally.

We watch black-clad mourners carrying a wooden coffin to its final resting place on a mountaintop. When they reach the site, they sing songs and offer eulogies.

At the head of the coffin stands the Rev. Brad Davis, a Methodist minister who works in one of the coalfields’ most impoverished communities. He offered a eulogy for King Coal during the ceremony, although it didn’t make the final edit of the film. Sheldon and her team plan to publish it later, online. Davis said he doesn’t mind.

“I view that whole film as a eulogy, helping our people transition into a new reality — which is what an actual eulogy does,” he said.

There was no one inside the coffin, but Davis said he treated the occasion just like he would any other funeral service.

“You’re almost performing the duty of a midwife, transitioning the family from one reality into a new reality. But it’s proclaiming a hope-filled future,” he said. “You stand there and stare directly into the face of death and proclaim resurrection.”

Standing on that mountainside, Davis did not proclaim the resurrection of King Coal, though.

“It’s the resurrection of us,” he said.

King Coal’s coffin is not buried. Unlike the people who die in his service, he does not return to the earth from where he came. His coffin is set ablaze, the flames licking the night sky.

Onscreen, it looks like the pillar of fire that led the children of Israel — before they had a king.

“When I was making the film, I was thinking a bit about rituals and grieving and all the things we do to figure out what our purpose is,” she said. “How we let something go.”