RIO DE JANEIRO — A young American lawyer comes to Brazil in 2005, falls in love, finds that his gay relationship confers greater legal rights than back home, starts a blog called Unclaimed Territory focusing on illegal warrantless eavesdropping by the National Security Agency, takes a place in the hills of Rio with a bunch of rescue dogs, denounces the cozy compromises of “establishment journalists,” gets hired to write a column by Britain’s Guardian newspaper, is sought out by the N.S.A. whistle-blower Edward J. Snowden, becomes the main chronicler of Snowden’s revelations of global American surveillance, is lionized for work that prompts a far-reaching debate on security and freedom, files repeated thunderbolts from his leafy Brazilian perch, and ends up, in just eight years, as perhaps the most famous journalist of his generation.

These things happen. At least they happen in the empowering digital age, and they happen to Glenn Greenwald.

With his gray shirt, black backpack, regular features and medium build, he merges into the Rio crowd, the ordinary man. Over a Thai lunch, he tells me he is sleeping five hours a night, running on adrenaline. So what does he do to relax? “Roll around in the mud with my 10 dogs.”

Unwinding is hard. The five months since he met Snowden in Hong Kong have been relentless; they talk almost every day. He lives in limbo. “I feel like if I went back to the United States there is a more than trivial chance I would be arrested,” he says. “Not one of 20 lawyers I have spoken to has said, ‘Oh, you are being paranoid; of course they would never think of arresting you.’ ”