Former national security contractor and famed whistle-blower Edward Snowden, in an appearance before an enthusiastic San Francisco audience Sunday via video feed, criticized his Russian hosts even as he dismissed the possibility of returning to the United States to face trial anytime soon.

“I have told the (U.S.) government I have only one condition for returning — that is they will guarantee a fair trial,” he said.

Snowden is convinced that won’t happen because, he insists, the 1917 Espionage Act under which he was charged does not allow him to explain his motivations behind revealing information about secret surveillance programs.

Snowden had been a contractor for the National Security Agency when he leaked millions of documents about electronic surveillance by the U.S. government in June 2013. He was granted asylum in Russia not long after and has lived there ever since.

But Sunday, he also was critical of Russia.

“Russia has extremely troubled politics,” he said, adding that a new law there is “harming the rights of every Russian.”

“If Russians are calling it the Big Brother law,” he said, “you really have to worry.”

Snowden appeared via video at the Nourse Theater alongside another famous whistle-blower, Daniel Ellsberg, who was there in person. In 1971, Ellsberg leaked the Pentagon Papers, a top-secret government study of the Vietnam War. KQED reporter Scott Shafer interviewed the men as part of City Arts and Lectures.

The audience seemed widely supportive of Snowden, who was alternately humorous and serious. He said government officials always justify surveillance programs on the premise that lives are at stake, “because it is the easiest grounds on which to win a political fight.”

“These programs are not about terrorism. ... They are fundamentally about power,” he said. “Surveillance is not about secrecy. Surveillance is about control.”

Snowden criticized President Trump and attributed his victory to “a failure of imagination.”

“Because I can think of no explanation for the result of the last election than people simply thought it was a joke … something that was not possible,” he said.

But Snowden said the “silver lining” was that millions of people took to the streets to protest. “People are realizing afresh that democracy is not for inheritance. This is a thing that will require constant exercise and tireless sacrifice.”

As for his life in Russia, Snowden offered few details. He said he mostly could take the train and walk around unnoticed — except in computer stores, where people often do a double take when they spot him.

Emily Green is a San Francisco Chronicle staff writer. Email: egreen@sfchronicle.com Twitter: @emilytgreen