CAMDEN, Maine — The night sky lit up around the normally quiet residential neighborhood on Thomas Street Sunday night when a house went up in flames as part of the final scene filmed for the upcoming horror movie “Island Zero.”

But there was no fear in the air as crowds gathered for light-hearted conversation, and snapped photographs and videos with cameras and cellphones. Firefighters kept watch but allowed the bungalow, built in 1900, to burn.

The movie is based on a screenplay written by best-selling writer Tess Gerritsen of Camden, which has been filming locally since the beginning of March.

The film is directed by Gerritsen’s son, Josh, and is being produced by Mariah Klapatch, who grew up and went to school in Camden.

Klapatch said in March she hopes to have the movie released in theaters by the end of 2017.

Camden fire Chief Chris Farley said Monday that the filming gave the department a rare opportunity to train on fighting fires in a real house. The department got about 20 hours of training over five nights, including the during the finale Sunday night.

The property’s owner — Ronald Hawkins — is responsible for the cleanup following last night’s exercise. The rubble from the fire collapsed into the foundation of the former house.

Tess Gerritsen completed writing the screenplay in early 2015. Josh Gerritsen has done freelance video and photography assignments since 2004, and this is the first feature film produced by Klapatch, who studied film and television at New York University.

Klapatch said the movie is set on a remote island that has lost power and communications with the outside world after the ferry from the mainland fails to arrive. People begin dying off in gruesome and mysterious ways as a core group of residents begin to find clues to what is behind the acts.

A sea monster plays a role in the movie, and the movie’s theme is rooted in climate change and the impact humans have on the environment.

Actors in the film include actress Laila Robbins, who has appeared in many movies, including as the wife of Steve Martin’s character in the 1987 movie “Planes, Trains and Automobiles,” and on television, including Showtime series “Homeland.”

Other actors in the film are Adam Wade McLaughlin, Teri Reeves and Matthew Wilkas.

Klapatch said one of the core goals of the production team was to employ and cast as many Mainers as possible. About 80 percent of the crew and cast of 50 are from Maine.