WILLISTON, N.D. (AP) — When filmmaker Jesse Moss started hearing about the North Dakota oil boom that was creating overnight millionaires and drawing workers from around the country to a seemingly endless number of high-paying jobs, he imagined there was a darker side of the story.

Over the course of a year and a half, Moss followed a Lutheran pastor in Williston who had allowed down-and-out migrant workers to sleep in his church, its parking lot and eventually his home. Pastor Jay Reinke's decision to allow the workers — including registered sex offenders — to live at the church stoked tensions with a local community that had been an isolated, small farming town just a few years earlier.

The result of Moss' time spent bedding down in church hallways alongside the workers and following Reinke through North Dakota's frozen prairie was "The Overnighters," which won the Special Jury Award for Intuitive Filmmaking earlier this year at the Sundance Film Festival. The documentary opens on Oct. 10 in New York City and dates for screenings in other cities across the country, including Austin, Texas, and San Francisco, are set through December.

More than 1,000 different people slept in the church over the two years it ran the housing program, with more staying in the parking lot. At a time when much of the country still felt the pains of the Great Recession, western North Dakota had more jobs than could be filled. But on the ground, many new arrivals found that hardships — worsened by a high cost of living — continued.

"The boomtown is a place of last resort for so many people," Moss said. "These are guys — and women, too — who are really holding on desperately to the bottom rung of the ladder. And when they slip from that position, there's nothing left."

One man in the film, Keith Graves, is a truck driver from California who in 1999 was convicted of a felony charge for lewd acts with a child younger than 14. After a local newspaper discovered sex offenders were living at Reinke's church, the pastor invited Graves to live at his home to shield the congregation from criticism.

"A sin or a crime, while it is real and a part of one's record, I would submit may not be the definition of one's life," Reinke said in the film, regarding his decision. "I'm not going to put my children at risk and I do not believe that I have."

Since the documentary, Graves has been arrested again. He was charged last month with human trafficking, gross sexual imposition and other alleged offenses. He's accused of running a prostitution ring out of area hotels and raping a woman he was recruiting multiple times.

Reinke has said Graves was not staying with him at the time of the alleged new crimes. Graves has said he's not guilty of the charges.