By the time Alex Gibney started chronicling the story of Julian Assange and Wikileaks in “We Steal Secrets” — which debuts May 24 via Focus World — the charismatic hacker’s personality had already changed. The attention-craving Aussie was becoming secretive and paranoid, but there was still a possibility he would agree to be interviewed by Gibney, the Oscar-winning documentarian of such weighty subject matters as U.S. torture practices (“Taxi To The Dark Side”), Catholic Church abuse (“Mea Maxima Culpa: Silence in the House of God”) and the scandelous collapse of one of America’s largest corporations (“Enron: The Smartest Guys in the Room”).

After a marathon six-hour negotiation, Assange declined to cooperate with Gibney, fearing he would be misrepresented.

That was a far cry from the Assange of a few years earlier, who let Australian journalist Mark Davis trail him around the world as he crusaded for the cause of open information and government and business transparency.

“I had been trying for over a year” to interview Assange, says Gibney. “But honestly, there’s always a way.”

Even without on-camera interviews with the docu’s central characters Assange and Bradley Manning, Gibney was able to weave a thriller-like narrative detailing the rise and fall of Wikileaks.

Assange started drawing worldwide attention when he invited users to submit confidential documents on a secure website, revealing sensitive material during the Icelandic financial crisis. But Wikileaks became even more famous when Manning, a depressed, sexually confused young Army intelligence analyst in Iraq, began releasing hundreds of thousands of secret documents to Wikileaks with the aim of informing the world about military atrocities. Some of the docs were published by the New York Times and other major newspapers. At first, “We Steal Secrets” planned to focus primarily on Assange, but Manning’s story proved to be equally fascinating.

Manning wasn’t able to be interviewed before his trial in June, but records of his online chats with the man who eventually turned him in had been released. And Gibney had access to plenty of filmed material on Assange; the verite footage from Davis was pivotal to showing the Wikileaks topper when he was younger and almost gleefully idealistic.

But by the time Gibney started the doc, Assange “already imagined himself as the grand puppetmaster,” says the documentarian.

Like all the subjects Gibney has tackled, the complex scope of the Wikileaks story seemed like a natural fit. It was former Universal movie chief Marc Shmuger who first approached Gibney about the project. “In 2010, I became captivated by the mission of Wikileaks,” explains Shmuger, now a producer. “It seemed to signal a new era of transparency. I thought the intersection of technology and openness was the perfect subject to explore as a documentary.”

However, portraying Internet chats or vast databases of material onscreen can be challenging. Gibney turned to special effects house Framestore to give a sense of activity and movement to the scenes showing computers containing leaked documents.

The filmmakers let Manning’s story emerge through the actual texts he sent to cyber-pal Adrian Lamo that were obtained by Wired magazine.

“The chats are an oddly vital way of showing a kind of modern character, he reveals a lot about himself in them,” says Gibney, who says it took over a year to figure out the most effective way to show that side of the story.

Seeing the texts onscreen is “actually the most intimate part of the movie,” says Shmuger.

In fact, Shmuger and Gibney found Manning’s story so compelling that they optioned a book about him and are meeting with writers to package it as a narrative film.

Considering the level of interest and controversy swirling around Assange and Manning, it’s not surprising their stories have inspired several books and TV and film projects. Benedict Cumberbatch stars as Assange in DreamWorks’ October release “The Fifth Estate,” based on two books about the events.

Assange, who has been holed up in a small room in the Ecuadorian embassy in London for nearly a year, fighting extradition to Sweden on sexual assault charges, has denounced both “We Steal Secrets” and “The Fifth Estate” as being twisted and unfavorable to him.

“He feels the source materials we’ve based the movie on were poisonous to his account of the events,” Cumberbatch told the Guardian recently.

“There’s a rich irony there,” suggests Gibney. “Wikileaks was supposed to be all about the truth. But Assange started telling lies for what he called a noble cause, to enhance his reputation. It was a classic character arc,” said Gibney, “The idealist became the very thing he was against.”