BRUNSWICK — Locals might recognize a few familiar places in scenes from a new movie released earlier this month.

“The Witch Files,” a teen dramedy mixed with suspense, was directed by York native Kyle Rankin and produced by Brunswick’s Scott Taylor, and filmed entirely in Bath, Brunswick and Portland. The film tells the story of five high school girls who “tap into witchcraft,” only to find that their use of dark magic has some unintended consequences.

“I have two daughters with a third one on the way, and I wanted to create something that they might want to watch at a sleepover around Halloween when they’re 11 or 12,” Rankin, now living in Los Angeles said in a phone interview.

His first film, “Night of the Living Deb,” was also shot in Maine and has a similar horror-meets-humor style, but with zombies instead of witches.

“I’m definitely a genre filmmaker,” Rankin said, “I wouldn’t want to do a film where a 35-year-old man finds himself after moving in with his grandparents.”

Plus, horror tends to be a better option financially, he added. To market a comedy or a drama, most films need big name stars, he said, but in with horror, “we don’t care who scares us.”

The financial burdens of an independent film were another reason Rankin chose to film in Maine. Working with a budget of about $250,000, he said that in Maine people are genuinely excited to have their streets, bars or schools turned into filming locations, whereas in Los Angeles it is routine and many places will charge thousands of dollars just for the use of the location. Extras, too, can cost an exorbitant amount of money.

Rankin filmed many of the scenes inside Morse High School in Bath, with many of the students going back to the school on weekends to be extras in the movie, he said. Many of the kids still keep in touch over social media, anxiously awaiting the movie’s release so they can see themselves in action.

“You can’t buy that,” he said.

While the movie has plenty of local faces in the background, the cast also features names like Paget Brewster (“Criminal Minds”), Holly Taylor (“The Americans”) and Scarborough native Greg Finley (WB’s “The Flash”).

The film is available on DVD, iTunes and VOD.