Washington — Edward J. Snowden, the former National Security Agency contractor whose leaks of secret documents set off a national and global debate about government spying, is joining the board of a nonprofit organization co-founded by Daniel Ellsberg, the well-known leaker of the Pentagon Papers during the Vietnam War.

The announcement by the group, the Freedom of the Press Foundation, is the latest contribution to a public relations tug of war between Mr. Snowden’s critics, who portray him as a criminal and a traitor, and his supporters, who say he is a whistle-blower and source for the news media in the tradition of Mr. Ellsberg.

The foundation’s board already includes two of the journalists Mr. Snowden gave N.S.A. documents to, Glenn Greenwald and Laura Poitras. But the organization — which consulted with lawyers about whether adding Mr. Snowden to its board could jeopardize its nonprofit tax status — is trying to emphasize parallels between Mr. Snowden and Mr. Ellsberg.

In 1971, the Nixon administration charged Mr. Ellsberg with violating the Espionage Act because he gave the Pentagon Papers, a classified history of decision-making about the Vietnam War, to The New York Times and other newspapers. A court eventually threw out the case for government misconduct. Mr. Snowden has been charged under that same law.