Julian Assange detests “Risk,” the incisive new documentary about the WikiLeaks founder that premieres on Friday, and it’s easy to see why he’s not a fan.

Over the course of six years, director Laura Poitras was granted unprecedented access to Assange and his team, shooting them as they broke one big story after another. If he was hoping that the resulting film would lionize him as a man of principle, courageously defying governments and big corporations by leaking classified data, he was gravely mistaken.

Yes, as the title suggests, Assange is willing to put everything on the line, risking imprisonment and worse to publish information he believes the public has a right to know, but there’s a darker side to this idealist. “Risk”  doesn’t pull punches in depicting Assange as an egotist, who practically preens for the camera. Even more disturbing (at least to this viewer), is that “Risk” also shows how Assange’s attitudes toward women are sexist to the point of being misogynistic.

Assange, who has been accused of sexual assault by two Swedish women, is filmed suggesting his accusers were spurred on by radical feminists. He is also shown making several sexually suggestive comments to female colleagues. He denies the assault allegations, and has refused to meet with investigators in Sweden because he believes the country would extradite him to the United States.

“Risk,” which seems destined to generate headlines, inspire debate, and gin up Oscar buzz, isn’t just interested in a warts-and-all portrait of a publisher who upended the establishment. It’s also a searing portrait of the modern surveillance state and an urgent look at the threats that investigative journalism faces from governments intent on rooting out leakers.

Poitras, who is best known for directing “Citizenfour,” the Academy Award-winning documentary about NSA whistleblower Edward Snowden, said that after seeing “Risk,” Assange stopped speaking to her. She spoke to Variety about what made Assange so angry, as well as her approach to filmmaking and the rationale behind some of WikiLeaks’ secret stealing.

You set out to make a film about journalism, but “Risk” became more concerned with issues of gender and power. Why did that shift happen?
I wasn’t planning to focus on issues around gender. It’s still very much about journalism, but that became a sub-theme that I had to deal with that I didn’t think I’d have to deal with going in. It’s still a film about WikiLeaks’ publishing and the impact that it has had.

Is what WikiLeaks does journalism?
I would describe them as a publisher of interesting journalism. They release huge stories — the Iraq war log, the Afghanistan war log, the State Department cables, the current CIA leak — those are all huge news stories that have been published and picked up by news organizations around the world. They believe that they publish primary source documents so that other people can also draw from them, without curating them. I understand that philosophy. I do have some differences in terms of their decision to publish people’s names and personal information that I consider to not be newsworthy, but I absolutely think they’re engaged in journalism.

What’s your reaction to Attorney General Jeff Sessions’ announcement that the United States is considering filing criminal charges against Assange?
It’s really distributing and not just disturbing because they’re targeting WikiLeaks, but because they are direct attacks on the First Amendment. There’s a chilling effect. It’s not like the Obama administration was any friend of investigative journalists. They were very, very aggressive in terms of leakers. Trump campaigned on wanting to target the media and now they’re talking about prosecutions and investigations into leakers. We would be foolish to think the threat is only against WikiLeaks. The threat is to journalism more broadly.

Did your views on Assange change during the making of the film?
I’d frame it differently. In 2011, I began the film with a feeling of optimism. The journalism WikiLeaks was doing had come at a time when we had seen so little deep journalism into the wars in Iraq and Afghanistan. To see them publish information that told the public what was happening, I thought was really essential. Other things were happening globally, the Arab Spring, that felt really hopeful. And now we’re in this historical moment where it all feels so dark. The outcome feels so, I don’t know, dystopian. I’m not placing that all on WikiLeaks, but I guess the arc of the film ends on a dark note.

Do you think that WikiLeaks acted responsibly in releasing the DNC emails? Was Assange motivated to publish the hacked material out of personal animus toward Hillary Clinton?
I would push back on the vendetta theory, and I also think that Julian, people embrace him depending on what he’s publishing and how it fits into their ideological position. He’s praised one moment and then derided in another depending on the information that he’s releasing. But it was consistent with his mission and his goal, which is to publish information about institutions, such as governments and corporations, that impacts citizens and that are kept in secret. His publishing of the DNC emails was consistent with that.

I have some questions in terms of how it was done, being published in multiple parts over a period of time, and the publishing of personal information, but I think that the emails themselves had tremendous amount of newsworthy information. They were covered by most of the major news outlets. It was front page news.

Many of Assange’s comments in the film seem inappropriate and even misogynistic. Were you disturbed by his attitudes?
I feel similar to your responses. I find them to be disturbing, but I felt they were important to include in the film in terms of having a complex nuanced, depiction of Julian. They’re his words, right? There were no hidden cameras.

Assange disapproves of “Risk.” Is he upset that the film highlights his troubling relationship with women?
It’s around those issues. He didn’t want them to be in the film.

But it’s not just Assange who exhibits questionable behavior. Jacob Appelbaum, another member of the WikiLeaks circle, has also been accused of sexual assault and bullying. He denies the charges, but you reveal in the film that you were involved with him in 2014 and that a friend of your’s was bullied by Appelbaum. Why did you focus on those allegations and why did you go public about your relationship?
To include that I felt that I needed to disclose my involvement with Jacob, both so the audience knows about it, and because I had insights which I reference in the film about someone close to me that he’d been abusive towards.

In the film, at one point, you say that while making “Risk” the “lines have become blurred.” How so?
When I began filming, I was a documentarian looking in from the outside, so the opening scene of the film, there’s a conversation where they’re calling the State Department and they’ve learned that their password has been published and documents are about to come out. They were very nervous in that situation. It was “what should we do?” From the outside, I could sense there was tension, but I wasn’t having to make that decision.

I got pulled into the story very directly when I was contacted by Edward Snowden, and I was put in the position of having to make those same kind of decisions. I became more of a participant. That created the blurring.

Do you resist becoming less of an objective observer?
There’s a long tradition of journalism that comes from a first-person perspective, and I fall into that. I don’t shy away from saying what my political views are. There are some journalists that wouldn’t go to a protest or wouldn’t answer a question about what they think about a war. I don’t believe in that. I will express my opinions about things. All of my films are told from the perspective of the people I’m filming and they’re happening in real time, so they are, I guess, subjective in that sense. But the journalistic obligation to get the facts right still applies.

How are Edward Snowden and Julian Assange different?
I’m going to pass on that question.

I’m really against this mainstream media comparison and there’s a lot of comparisons that people make between Edward Snowden and Chelsea Manning, and I just don’t think that’s a narrative that I want to play into. There’s more commonalities. Of course, there are differences. The most obvious difference is that one is a source and a whistleblower, Edward Snowden, and the other is a publisher, so there’s a different role.

You’ve been surveilled. You’ve been detained while traveling. Given the controversial nature of your work, and the fact that many of your subjects are not exactly friends of the U.S. government, how do you avoid becoming paranoid?
Paranoia usually applies when there is no cause for suspicion. I think I have more than enough evidence that I have been surveilled. I’ve been doing a lawsuit against the government, a FOIA request for more information about why I’ve been stopped at borders. In the documents I’ve gotten, I know that they send FBI agents to my screenings to listen to my Q&As and they report back to the FBI office. I don’t need to be paranoid to know that’s going on.

It is disconcerting that journalists are being targeted in this way. It can have a chilling effect, but I also think I’m not the first journalist who has been targeted by the U.S. government, and I’m not going to be the last.

This interview has been edited and condensed for clarity.