War in Afghanistan and Iraq has defined his generation, according to 38-year-old Danish writer-director Tobias Lindholm.

Denmark had sent few men into battle in decades when it joined the post-9/11 coalition forces. Lindholm wanted to make a film about this part of contemporary Danish life, but a way into the story eluded him.

“Then I read this interview with a Danish officer going on his third tour to Afghanistan,” says Lindholm. “He said he wasn’t afraid of getting killed down there. He was afraid of getting prosecuted when he got back home because of the rules of engagement that he felt were in the way of him doing his job, preventing his men from dying, and so on.

“Right away, when I read that, I knew that was probably a place I could find a story to tell.”

Lindholm titled the drama that interview inspired simply “A War,” and it is an Oscar nominee for best foreign-language film. Pilou Asbæk — a longtime collaborator who appeared in his 2010 prison drama “R,” the 2012 “A Hijacking” co-directed by Michael Noer and also “Borgen,” the TV series that Lindholm scripted for a time — stars as Claus Michael Pedersen. While his wife, Maria (Tuva Novotny), holds down the home front and cares for their three children, Claus is a company commander in Afghanistan. When a mission goes wrong, resulting in collateral damage, he is called back to Denmark to stand trial for war crimes.

“The rules of engagement are there for a reason,” Lindholm says. “We need to have them there. We need to protect civilians, but at the same time, I felt the politicians use these rules of engagement to tell their voters that it was a civilized war. I think that’s a very dangerous thing to believe in, that there is such a thing as a civilized war.

“I do believe that we as a Danish society should be in some moral way put on a trial,” he adds. “Not for real, but have we done the right thing? What have we done? It’s ultimately the opposite that’s happening. What’s happening is we are not talking nearly enough about it.”

Asbæk has been cast as Euron Greyjoy in the upcoming sixth season of “Game of Thrones,” and Lindholm jokes that he is probably the only person in the world hoping the character will die quickly so that they can resume their partnership. The collaboration has been close, and the director calls the actor the finest European actor of his generation. And yet when casting “A War,” Lindholm — who researched his story by talking to soldiers, their families, refugees, lawyers, judges and even Taliban soldiers — mixed and mingled professional actors and real people, thrusting amateurs up against the consummate pro Asbæk.

“In a practical way it helps me a lot because I don’t need to direct the soldiers, they can direct me,” he says. “They can tell me how soldiers move and do stuff. Same with the judge.

“We cannot go out and claim to be a realistic picture of anything if we are not 100 percent dedicated to do exactly that. … It’s definitely my point that we have a responsibility to make sure that we are 100 or 110 percent sure that what we are portraying is actually a part of the real world.”

Lindholm made “A War” to spark discussion in Denmark, which he says it has, but he has also discovered in screening the film for veterans in the United States and Britain that he has struck a nerve internationally.

The veterans “recognized their reality and their lives in the film, which makes it somehow a global conversation,” he says. “Not a debate. I don’t want to be part of a debate pro or against the war. It has already happened. I want to be advocating for us looking at it and being able to talk about it. …

“What we need to do is look at what actually happened down there, what is happening, and hopefully we’ll be clever enough to learn from it.”