Michael Winter

USA TODAY

Edward Snowden suggested during an interview that aired on NBC Wednesday night that he believed he did the right thing in making classified U.S. government information available to the news media.

"There have been times throughout American history where what is right is not the same as what is legal," Snowden said during the hourlong interview that aired from Moscow in Russia, where Snowden has been granted asylum. "Sometimes, to do the right thing you have to break the law," he said.

During the conversation with NBC's Brian Williams, Snowden was critical of the war in Iraq and questioned the breadth of the government's legal authority when it comes to surveillance. He also said he can live with what he has done.

"Being a patriot means knowing when to protect your country, knowing when to protect your constitution, knowing when to protect your countrymen from the ... encroachments of adversaries and those adversaries don't have to be foreign countries," he said. "I may have lost the ability to travel but I've gained the ability to sleep at night ... and I'm comfortable with that."

Snowden also said he was more than just a low-level intelligence analyst or hacker, as the Obama administration and news media have portrayed him.

He said he worked undercover for the CIA and the National Security Agency.

"I was trained as a spy in sort of the traditional sense of the word, in that I lived and worked undercover overseas — pretending to work in a job that I'm not — and even being assigned a name that was not mine," the master secrets spiller told NBC News in his first interview with a U.S. TV network.

Portions of the interview conducted last week also were broadcast Tuesday night and Wednesday morning.

Snowden, who was granted temporary asylum in Russia after revealing details of U.S. spying activities to journalists, told Williams he wants to return to the United States — when intelligence-gathering programs targeting Americans are overhauled.

"I don't think there's ever been any question that I'd like to go home," he said. "My priority is not about myself. It's about making sure that these programs are reformed — and that the family that I left behind, the country that I left behind — can be helped by my actions."

Addressing the "somewhat misleading" characterizations of his skills, Snowden portrayed himself as "a technical specialist ... a technical expert."

"I don't work with people. I don't recruit agents. What I do is I put systems to work for the United States. And I've done that at all levels from — from the bottom on the ground all the way to the top," Snowden said.

In addition to his overseas spy craft, Snowden told NBC that he had also lectured at a counterintelligence academy for the Defense Intelligence Agency.

After leaving the government, Snowden continued his intelligence work for the NSA as a private contractor, including stints in Japan and Hawaii. While in the Aloha State he downloaded an estimated 1.7 million files before fleeing first to Hong Kong and then to Moscow.

He has been charged with espionage and had his U.S. passport revoked.

He said he's surprised he wound up in Russia and blames the State Department for stranding him there.

"I had a flight booked to Cuba onwards to Latin America and I was stopped because the United States government decided to revoke my passport and trap me in Moscow Airport," he said in an excerpt broadcast Wednesday on NBC's Today show. "So when people ask why are you in Russia, I say, 'Please ask the State Department."

Responding to the interview, Secretary of State John Kerry mocked Snowden and invited him to return to the United States to face prosecution.

"For a supposedly smart guy, that's a pretty dumb answer, frankly," Kerry said. "If Mr. Snowden wants to come back to the United States today, we'll have him on a flight today.

"That's what a patriot would do. A patriot would not run away and look for refuge in Russia or Cuba or some other country," he added. "A patriot would stand up in the United States and make his case to the American people."

Kerry continued his attack, telling CBS This Morning that Snowden had betrayed his country and "should man up" and come home.

"If he has a complaint about what's wrong with American surveillance, come back here and stand in our system of justice and make his case," Kerry said. "But instead he's just sitting there taking potshots at his country, violating his oath that he took when he took on the job he took, and betraying, I think, the fundamental agreement that he entered into when he became an employee."

Kerry said that Snowden had "damaged his country very significantly, in many, many ways" and had "hurt operational security."

"He has told terrorists what they can now do to be able to avoid detection, and I find it sad and disgraceful," Kerry said.

Don't expect him to return to the United States anytime soon, one of Snowden's legal advisers said.

"The laws under which Snowden is charged don't distinguish between sharing information with the press in the public interest, and selling secrets to a foreign enemy," ACLU lawyer Ben Wizner told The Guardian, one of the main outlets for Snowden's disclosures.

"The laws would not provide him any opportunity to say that the information never should have been withheld from the public in the first place," he said.

Last week, the House of Representatives voted to end the NSA's bulk collection of so-called metadata from cellphones, a practice Snowden revealed.

In April, The Guardian and The Washington Post were awarded a Pulitzer Prize for stories based on documents he provided.

Contributing: Melanie Eversley, Doug Stanglin