For filmmaker Rory Kennedy, the genesis of her new HBO documentary, "Ghosts of Abu Ghraib," lies in psychology.

"I was struggling to understand how ordinary people commit extraordinary acts of violence," says Kennedy, 38, who was born six months after the assassination of her father, Sen. Robert F. Kennedy, and five years after President John F. Kennedy, her uncle, was assassinated.

"There is an enormous discrepancy between what we think we'd do and what we would actually do," adds Kennedy by phone from New York. The Emmy-nominated documentarian was researching the roots of genocide when she changed her focus to the abuse of Iraqi prisoners by U.S. soldiers at Abu Ghraib.

Kennedy's film asserts through interviews with soldiers, legal experts and Iraqi detainees that the Bush administration, disregarding the Geneva Conventions, justified any means necessary to gather intelligence, and that the perpetrators of the torture were following sadistic orders and eventually couldn't resist inflicting their own criminal punishments.

While not excusing the abuse, Kennedy also says the horrors of daily life at the prison exacerbated the lethal situation.

Why, though, would the abusers describe their actions so candidly for Kennedy's camera? Military police officer Javal Davis, who was sentenced to six months in a military prison and whose case is under appeal, says he was persuaded to appear -- a process he describes as "very painful" -- by watching Kennedy's previous films.

"When you're being tried in a court of public opinion, you would like the entire story to be told, not just the story that the government wants. There were a lot of people contacting me, for good and bad reasons. I knew her project wasn't going to be a National Enquirer-type thing," Davis says by phone.

Kennedy has directed or produced more than 20 documentaries, most of which examine social injustice. They have included such Emmy-nominated works as "American Hollow," about an impoverished Appalachian family, and the five-part series "Pandemic: Facing AIDS," which aired on HBO in 2003.

Kennedy was surprised to find Davis, the first perpetrator she interviewed, to be "disarming and likable." "It would be easier to understand if the soldiers were monsters," she says. "But they're not. They're not unlike you and me."

For Kennedy, making the film took its toll. "Seeing those images day in and day out, there was churning in the pit of my stomach. I'm used to feeling safe and secure in the world, but this project changed that," says Kennedy, who lives in Brooklyn with her screenwriter husband, Mark Bailey, and their two children, Georgia, 4, and Bridget, 2.

She is vehement on the subject of America's tarnished reputation as a human-rights leader: "The people who run our country are scared and are making policies out of that fear."

And Kennedy firmly -- and politely -- dismisses the suggestion that she might be drawn by her father's death to issues of violence. Instead, she credits the social activism in her large extended family -- she is the youngest of 11 children -- as the root of her career.

She is quick to characterize her life as "incredibly fortunate," but when pressed, acknowledges that darker events require her "to be very disciplined about continuing to have an open heart." (Her brother David died in 1984; another brother, Michael, died in 1997; her cousin John and his wife, Carolyn, along with sister-in-law Lauren Bessette, died in 1999.)

"When you experience loss, you must confront it on some level," she says.

She draws an analogy to Abu Ghraib. "There is a temptation as a country to shut down and to pretend it didn't happen. To lock 11 people up in prison and to tie it up in a little bow and put it behind us. But these things don't go away."

The heroes of the film, in Kennedy's eyes? The Iraqi detainees, all but one of whom appear on camera with faces obscured for fear of retaliation from American soldiers.

"Their willingness to trust me, after everything America did to them, well . . ." said Kennedy, her voice trailing off. "Their courage is extraordinary."