OSLO — On July 22, 2011, the Norwegian filmmaker Erik Poppe was driving home to Oslo from southern Norway when he got a phone call from a panicked assistant. His employee, he recalled, said that a bomb had exploded near Mr. Poppe’s office, in the center of the Norwegian capital. Although it wouldn’t become clear until later, a right-wing extremist called Anders Behring Breivik had set off a car bomb in the city’s government quarter, killing eight.

That evening, Mr. Poppe said, he followed in horror as news broke of a further attack — a mass shooting at the Norwegian Labor Party’s summer youth camp on the island of Utoya, about 19 miles northwest of Oslo. Disguised as a police officer, Mr. Breivik had murdered 69 people and injured many more, almost all teenagers, before giving himself up when the security forces arrived.

“We were sitting there, completely in shock,” Mr. Poppe said. “It wasn’t just an attack on those kids on the island, or the victims downtown, but also an attack on our democracy.”

Six and a half years later, Mr. Poppe, one of Norway’s best-known directors, has channeled his outrage into a film, “U — July 22,” the first cinematic depiction of the attack. The movie, which opened in Norway on Friday, has prompted a wider debate about the ethics of fictionalizing the traumatic event.

After its premiere in February at the Berlin International Film Festival, where it played in competition and screened just days after the shooting in Parkland, Fla., in which 17 people were killed, the movie also spurred a discussion about gun control and about the dangers of right-wing extremism. Two other movies and a television series about the attacks are currently in the works, including a film for Netflix helmed by Paul Greengrass, the director of “United 93.”

Norway has struggled in recent years to pay tribute to victims of the attack. A planned memorial near Utoya was canceled after public complaints, and many have argued that the media’s focus on Mr. Breivik, who has filed complaints about his treatment in prison and recently changed his name to Fjotolf Hansen, has taken attention away from the victims. “I realized there should be a story from the young people’s perspectives entirely, that brings that into our collective memory again,” Mr. Poppe said.

“U — July 22” is a rigorously faithful reconstruction of the events on the island. It closely follows a fictional 19-year-old named Kaja (Andrea Berntzen), who is separated from her younger sister when the attack begins, and is forced to scramble for shelter — in a small building, among trees and along the island’s rocky shoreline — as others are murdered around her. In an impressive technical feat, the 90-minute film was recorded in one take, with two invisible cuts to hide geographical differences between Utoya and the neighboring island on which it was filmed.

When Mr. Poppe first approached the national support group for victims of the July 22 attacks about his plans to make a film, some members of the group voiced concerns that not enough time had passed. “We were worried it might be too early, because many people want to shield themselves,” said Lisbeth Royneland, the chair of the group’s board.

One mother of a victim, Mr. Poppe recalled, offered him a stern warning about depicting anything beyond what really happened. “She said, ‘If you make it about something else — love, hope — I will never, ever, ever forgive you. I will hunt you down,’ ” he said. But after Mr. Poppe explained his plans for a pared-down film focused on the victims, the group’s leaders gave their blessing.

Mr. Poppe’s decision to make the film has been heavily debated in the Norwegian media. In an article last summer for the website of NRK, the national broadcaster, one survivor accused Mr. Poppe of “turning my life’s nightmare into popular entertainment” and argued that Norwegians should instead be discussing the spread of Mr. Breivik’s ideology.

Mr. Poppe said that he could not argue with survivors’ personal feelings but that he believed that in an era of rising right-wing populism across Europe and in the rest of the Western world, he felt it was especially important to show the consequences of extremist ideology.

In preparing the film, Mr. Poppe and his team conducted interviews with over 40 survivors and incorporated their experiences into the script. One scene in which Kaja sings Cyndi Lauper’s “True Colors” to calm down other hiding youths, for instance, replicates a real moment on the island, even down to the song.

Mr. Poppe and his team filmed with a cast of amateur actors over five days in September last year, using loudspeakers to replicate the exact number of shots fired by Mr. Breivik. The speakers, he said, were turned away from the shoreline to avoid traumatizing neighbors, and several survivors were on set to ensure the film’s accuracy. Mr. Poppe, who has previously worked as a war photographer, also partly drew on his experience working in conflict areas like Afghanistan.

To get the role of Kaja, Ms. Berntzen — a 20-year-old whose only previous acting experience had been in high school theatrical revues — had to undergo eight auditions and a psychiatric evaluation. And to maintain secrecy, she was only told midway through the process what the film was actually about. “I remember thinking I should be happy if I don’t get a role,” she said in an interview, referring to the unusual approach. But when Mr. Poppe explained his ideas and motives, she was convinced, she said.

“A whole generation is being born now for which July 22 is becoming as distant as World War II,” Ms. Berntzen added. “That’s why it’s important to have this movie.”

The reaction to the film in Norway has been generally positive, with a strong performance at the box office and many critics praising its intensity and faithfulness to the events. One writer in the newspaper Dagbladet, however, argued that the film lacked any interest in exploring a bigger “problem or tension,” and complained that it “is more interested in reproducing history than adding anything to it.”

Before the movie’s Berlin premiere, the filmmakers held screenings for the survivors and relatives across the country. Renate Tarnes, now the secretary general of the Labor Party’s youth organization, who survived the shooting by hiding in a cafe on the island, said that when she saw the film, her first reaction was “relief, because I really felt he and his crew understood what we’ve been through.”

Afterward, she texted Mr. Poppe to say that she had “been really skeptical, that I didn’t think it was possible to do it in a good way.” But the director, she said, “surprised me.”