Mr. MacFadyen founded and led the Centre for Investigative Journalism in London. (Centre for Investigative Journalism)

Gavin MacFadyen, an American investigative journalist who was a prominent advocate for members of his profession, for their sources and for Julian Assange, the embattled founder of the WikiLeaks anti-secrecy website, died Oct. 22 at a hospital in London. He was 76.

His wife, Susan Benn, confirmed his death. The cause was lung cancer, according to an announcement by the London-based Centre for Investigative Journalism (CIJ), which Mr. MacFadyen helped found and where he was director at the time of his death.

Mr. MacFadyen spent much of his professional life in England, where he established himself as a producer and director of documentaries that aired on outlets that included the BBC and Granada Television’s “World in Action,” a British investigative program that has been compared with CBS News’s “60 Minutes.” In the United States, his work was seen on programs such as the PBS documentary series “Frontline.”

He traveled around the world for his reportage, according to CIJ, covering topics that included the neo-Nazi movement in Britain, organized crime in China, the diamond trade in Africa, electoral fraud in South America, arms trafficking in the Middle East, nuclear proliferation and environmental degradation. In situations of what he considered paramount public interest, he worked in disguise.

Mr. MacFadyen founded CIJ in 2003 as a training ground for reporters in his field. He also was credited with helping found the Global Investigative Journalism Network, an association of nonprofit organizations, and the Bureau of Investigative Journalism in London.

“Gavin created an environment where everybody was helping everybody else,” Mark Lee Hunter, a Paris-based investigative journalist, said in an interview.

Through his work, Mr. MacFadyen developed an intense concern for whistleblowers, the sources who may risk their jobs or safety to reveal to a reporter evidence of corporate, governmental or other wrongdoing.

“It’s a dangerous thing being a whistleblower,” Mr. MacFadyen said last year in a speech covered by the Cape Argus of South Africa. “Many lost their wives, children and often livelihood. They needed protection.”

In time, CIJ began offering legal and psychological support to whistleblowers. Through that work, Mr. MacFadyen met Assange, the Australian national who founded WikiLeaks in 2006 as a clearinghouse for leaked information.

The site attracted widespread attention after the publication in 2010 of tens of thousands of State and Defense Department documents leaked by Army analyst Chelsea Manning. Manning is serving a 35-year prison sentence imposed in 2013 by a military judge.

More recently, WikiLeaks published a trove of hacked emails from the campaign of Democratic presidential nominee Hillary Clinton.

Many investigative journalists, while supporting transparency and related principles, vigorously oppose Assange’s methods, arguing that he essentially dumps information into the public arena without adequate consideration of how the information was obtained or of potential privacy or security concerns.

In 2012, facing a rape allegation in Sweden and fearing extradition to the United States over the Manning leaks, Assange took up residence at the Ecuadoran Embassy in London, where he remains. Mr. MacFadyen helped organize a legal defense committee and at times spoke on Assange’s behalf. In 2012, he declared that although Assange’s embassy abode was “not quite the Hilton,” it was also true that “we have all had worse.”

Speaking to the London Observer, Mr. MacFadyen described Assange as an “inspirational figure” and “probably the most intelligent person I’ve ever worked with,” despite his “unusual amount of self-confidence.”

Mr. MacFadyen saw a “natural community of interest” between journalists and hackers, both of whom, he said, sought information and had come under increasing pressures.

“There is a free Internet, there is a free press, and there is free speech,” he said in a 2014 speech reported by the London Guardian, “and we share all of those things together.”

Gavin Hall Galter was born in Greeley, Colo., on Jan. 1, 1940, and grew up in Chicago. His mother was a pianist. He did not know his father and eventually took the surname of his stepfather, a medical researcher.

Mr. MacFadyen studied at numerous high schools and universities before working as a field organizer with trade unions. He was jailed for participating in civil rights demonstrations, according to a biography provided by CIJ, before moving to England, where he joined the International Socialist Organization.

After graduating from the London School of Film Technique, he founded a film group that covered events that included race riots, anti-Vietnam War demonstrations and the turbulent 1968 Democratic National Convention in Chicago for the BBC. He also reported on the war between the right-wing rebel contras and the Marxist Sandinista government in Nicaragua in the 1980s.

His film work included collaborations with directors John Frankenheimer and Michael Mann. According to CIJ, he served as a technical adviser to Mann on “The Insider” (1999), which starred Russell Crowe as Jeffrey Wigand, a tobacco executive who exposed industry secrets about cigarette manufacturing, in particular regarding the addictive nature of nicotine.

Mr. MacFadyen’s marriage to Virginia Daum ended in divorce.

Survivors include his partner of 20 years, Susan Benn, whom he married in 2010, of London; a son from his first marriage, Michael MacFadyen of London; three stepdaughters, Sarah Saunders of Sussex, England, Deborah Ramsay and Samantha McLean, both of London; and six grandchildren.

Last week, following WikiLeaks’s publication of the hacked Clinton emails, the Ecuadoran government declared that Ecuador “does not meddle in electoral campaigns nor support any candidate in particular” and announced that Assange’s Internet access at the embassy would be “temporarily restricted.”

After Mr. MacFadyen’s death, WikiLeaks tweeted a tribute: “Gavin Macfadyen, beloved director of WikiLeaks, now takes his fists and his fight to battle God. Sock it to him, forever, Gavin.” The tweet was signed with the initials “JA.”