A songwriter says he called out to Hank Williams’ ghost and wrote a hit by morning. Then came the night at the Opry House.

Halloween night calls for a good ghost story, and country music has a great one.

It starts with Hank Williams, the Alabama country pioneer behind “Your Cheatin’ Heart” and “I’m So Lonesome I Could Cry.” Hank passed away in 1953, when he was only 29. To a Nashville songwriter named Gary Gentry, he was still the greatest there ever was.

Gentry told the story himself to The Tennessean newspaper.

“I wanted to write a masterpiece about Hank,” he said.

So he lit candles in his apartment and called out to him. “Show yourself! Help me write this song,” Gentry remembers saying. “Hank, we’re gonna take a ride. I wanna write about you.” And he told him, “I think you’re the greatest songwriter and entertainer that ever lived.”

Then, Gentry says, he looked over and saw Hank sitting shirtless on his couch.

By around 4 a.m., the song had poured out of him. He called his co-writer and woke up his wife so she could hear it.

Here’s Gentry himself singing the song he says came out of that night.

Gary Gentry sings “The Ride,” the song he wrote that night

The song is “The Ride.” Gentry wrote it with J.B. Detterline Jr., and it was recorded by outlaw country singer David Allan Coe. It came out on Feb 28, 1983, as the first single from Coe’s album “Castles in the Sand,” and it climbed to No. 4 on Billboard’s Hot Country chart.

In the song, a young singer is hitchhiking from Montgomery, Alabama to Nashville when a stranger gives him a ride. The driver wants to know if the kid really has what it takes to be a country star. By the end, you find out who’s behind the wheel. It’s Hank Williams’ ghost.

Gentry told Billboard there was something spooky about the song from the start. When he went to look up the date Hank passed away in a book about Hank’s life, he said, the book fell open to that exact page. “There’s a mysterious magic connected with this song that spells cold chills,” he said.

David Allan Coe sang it live in 1983, the same year it hit the charts.

David Allan Coe sings “The Ride” live in 1983

Now for the Opry House.

According to Gentry, when “The Ride” was performed at the Opry House for a TV show, it got all the way to the last verse. Then, right as the song reveals that the driver is Hank Williams’ ghost, the lights and the power went out across the whole Opryland complex.

Whiskey Riff put it nicely this week: “Apparently Hank has a way of making his presence known.”

Gentry later credited musician Phil Ball with a line that sums up the whole thing. “Hank don’t want to come back.”

Coe was still singing it more than ten years later. Here he is singing it at Farm Aid in 1994.

David Allan Coe brings “The Ride” to Farm Aid in 1994

The song has kept rolling. Country star Garth Brooks later recorded it on his album “Time Traveler,” and he was allowed to write a brand new middle verse for it.

Hank’s ghost shows up in another favorite, too. Taste of Country just ranked country singer Alan Jackson’s “Midnight in Montgomery” the No. 1 scary country song. In the song, Alan meets Hank’s ghost, and its spooky black-and-white video won Alan his first CMA Award in 1992. It’s a good one to watch with the lights low tonight.

Alan Jackson meets Hank’s ghost in “Midnight in Montgomery”

You can decide for yourself what really happened in Gentry’s apartment and at the Opry House that night. Gentry tells it as the night Hank helped him out.

And if your lights flicker while the song plays, you’ll know who to blame.