Gavin MacFadyen, an American investigative journalist who became an early mentor and defender of the founder of WikiLeaks, Julian Assange, died on Saturday in London, where he lived and spent much of his professional life. He was 76.

The cause was lung cancer, his wife, Susan Benn, said.

Since the 1970s, Mr. MacFadyen produced and directed scores of television documentaries on a wide range of subjects, including neo-Nazi violence, child labor, nuclear proliferation and industrial accidents. Sometimes he worked in disguise.

He also co-founded the nonprofit Center for Investigative Journalism in London in 2003, a training program in skeptical reporting, and WhistleblowersUK, a support group for tipsters. He was a director of WikiLeaks and, with his wife and another journalist, John Pilger, formed the Julian Assange Legal Defense Committee.

Mr. Assange, an Australian computer programmer, founded WikiLeaks in 2006 and published millions of secret documents, many supplied by Chelsea Manning, a United States Army intelligence analyst. Mr. Assange has been under investigation by the American government and is wanted for questioning about rape allegations in Sweden. He has found refuge in the Ecuadorean Embassy in London to avoid extradition.