Amid the chaos, Poitras, an intense-looking woman of 49, sat in a spare bedroom or at the table in the living room, working in concentrated silence in front of her multiple computers. Once in a while she would walk over to the porch to talk with Greenwald about the article he was working on, or he would sometimes stop what he was doing to look at the latest version of a new video she was editing about Snowden. They would talk intensely — Greenwald far louder and more rapid-fire than Poitras — and occasionally break out laughing at some shared joke or absurd memory. The Snowden story, they both said, was a battle they were waging together, a fight against powers of surveillance that they both believe are a threat to fundamental American liberties.

Two reporters for The Guardian were in town to assist Greenwald, so some of our time was spent in the hotel where they were staying along Copacabana Beach, the toned Brazilians playing volleyball in the sand below lending the whole thing an added layer of surreality. Poitras has shared the byline on some of Greenwald’s articles, but for the most part she has preferred to stay in the background, letting him do the writing and talking. As a result, Greenwald is the one hailed as either a fearless defender of individual rights or a nefarious traitor, depending on your perspective. “I keep calling her the Keyser Soze of the story, because she’s at once completely invisible and yet ubiquitous,” Greenwald said, referring to the character in “The Usual Suspects” played by Kevin Spacey, a mastermind masquerading as a nobody. “She’s been at the center of all of this, and yet no one knows anything about her.”

As dusk fell one evening, I followed Poitras and Greenwald to the newsroom of O Globo, one of the largest newspapers in Brazil. Greenwald had just published an article there detailing how the N.S.A. was spying on Brazilian phone calls and e-mails. The article caused a huge scandal in Brazil, as similar articles have done in other countries around the world, and Greenwald was a celebrity in the newsroom. The editor in chief pumped his hand and asked him to write a regular column; reporters took souvenir pictures with their cellphones. Poitras filmed some of this, then put her camera down and looked on. I noted that nobody was paying attention to her, that all eyes were on Greenwald, and she smiled. “That’s right,” she said. “That’s perfect.”

Poitras seems to work at blending in, a function more of strategy than of shyness. She can actually be remarkably forceful when it comes to managing information. During a conversation in which I began to ask her a few questions about her personal life, she remarked, “This is like visiting the dentist.” The thumbnail portrait is this: She was raised in a well-off family outside Boston, and after high school, she moved to San Francisco to work as a chef in upscale restaurants. She also took classes at the San Francisco Art Institute, where she studied under the experimental filmmaker Ernie Gehr. In 1992, she moved to New York and began to make her way in the film world, while also enrolling in graduate classes in social and political theory at the New School. Since then she has made five films, most recently “The Oath,” about the Guantánamo prisoner Salim Hamdan and his brother-in-law back in Yemen, and has been the recipient of a Peabody Award and a MacArthur award.

On Sept. 11, 2001, Poitras was on the Upper West Side of Manhattan when the towers were attacked. Like most New Yorkers, in the weeks that followed she was swept up in both mourning and a feeling of unity. It was a moment, she said, when “people could have done anything, in a positive sense.” When that moment led to the pre-emptive invasion of Iraq, she felt that her country had lost its way. “We always wonder how countries can veer off course,” she said. “How do people let it happen, how do people sit by during this slipping of boundaries?” Poitras had no experience in conflict zones, but in June 2004, she went to Iraq and began documenting the occupation.

Shortly after arriving in Baghdad, she received permission to go to Abu Ghraib prison to film a visit by members of Baghdad’s City Council. This was just a few months after photos were published of American soldiers abusing prisoners there. A prominent Sunni doctor was part of the visiting delegation, and Poitras shot a remarkable scene of his interaction with prisoners there, shouting that they were locked up for no good reason.

The doctor, Riyadh al-Adhadh, invited Poitras to his clinic and later allowed her to report on his life in Baghdad. Her documentary, “My Country, My Country,” is centered on his family’s travails — the shootings and blackouts in their neighborhood, the kidnapping of a nephew. The film premiered in early 2006 and received widespread acclaim, including an Oscar nomination for best documentary.