In 2013, Trump repeatedly called Snowden a "traitor" who gave "serious information to China and Russia" and who "should be executed." (Thomas Johnson/The Washington Post)

Before he was president, before he had broad authority to declassify government secrets as he sees fit, Donald Trump took a hard line against revealing classified information.

Specifically, he took a hard line against Edward J. Snowden, a former National Security Agency contractor who leaked troves of top-secret NSA documents on vast surveillance programs. Snowden said his widespread disclosures were in response to what he described as the government's systemic surveillance of innocent citizens.

Trump, then a private citizen, made known his disdain toward Snowden.

In tweets in summer 2013, Trump repeatedly called Snowden a “traitor” who gave “serious information to China and Russia” and who “should be executed.”

In October 2013, however, Trump said he'd consider changing his mind entirely about Snowden if he revealed President Barack Obama's birth records. For years, Trump was a purveyor of a conspiracy theory that Obama, who was born in Hawaii in 1961, was not a U.S. citizen, and demanded on multiple occasions Obama's birth certificate. Trump finally reversed his position in September.

In May 2014, Trump wrote on Facebook: “Snowden is a traitor and a disgrace. Make no mistake, he is no hero. In fact he is a coward who should come back & face justice.”

Snowden's revelation that he'd copied and kept 1.5 million classified documents and leaked them to journalists made him vulnerable to prosecution. The tech specialist has found himself stranded in Moscow, where he had sought asylum. Russia announced this year that it is extending Snowden's asylum to 2020.

The Obama administration had made clear it had no intention of pardoning Snowden. Lisa Monaco, Obama's adviser on homeland security and counterterrorism, said in 2015 that Snowden should come back to the United States “and be judged by a jury of his peers — not hide behind the cover of an authoritarian government.”

As president, Trump has broad control over government secrets. In a 1988 Supreme Court ruling, former Justice Harry Blackmun wrote that the “authority to classify and control access to information bearing on national security … flows primarily from this constitutional investment power of the President, and exists quite apart from any explicit congressional grant.” The language of the ruling has been interpreted to indicate that presidents have virtually absolute authority over classified information.

On Monday, shortly after The Washington Post reported that Trump had revealed highly classified and sensitive information to Russian officials, Snowden expressed what he felt was an irony between his current situation and Trump's disclosures.

Tuesday morning, Trump appeared to confirm The Post's story, contradicting statements from senior White House officials who denied its accuracy the day before.

“As President I wanted to share with Russia (at an openly scheduled W.H. meeting) which I have the absolute right to do, facts pertaining to terrorism and airline flight safety,” Trump said in a couple of tweets. “Humanitarian reasons, plus I want Russia to greatly step up their fight against ISIS & terrorism.”

But current and former U.S. officials told The Post that Trump's revelations to the Russian foreign minister and ambassador endanger cooperation from an ally that has access to the inner workings of the Islamic State. Officials said the U.S. partner who provided the information that Trump relayed had not given the United States permission to share the material with Russia.

The revelations were made during a recent White House meeting with Russian Foreign Minister Sergei Lavrov and Ambassador Sergey Kislyak in the Oval Office. Officials said Trump went off script and began describing details of an Islamic State terrorist threat related to the use of laptop computers on aircraft. The meeting was closed to all U.S. media, although one Russian photographer was allowed.

The new crisis facing the White House comes on the heels of the fallout over Trump's abrupt firing of James B. Comey as administration officials struggled to explain the reason for the former FBI director's dismissal.

A parade of White House aides went on TV last week saying Trump simply acted on the recommendation of Attorney General Jeff Sessions and Deputy Attorney General Rod J. Rosenstein, who wrote a memo saying Comey mishandled the investigation into Hillary Clinton's use of a private email server as secretary of state.

Trump, again contradicting statements made by his own surrogates, told NBC News's Lester Holt that the decision to fire Comey has been his all along, and the reason was the Trump-Russia controversy, which he dismissed as “a made-up story.” Comey had been leading an investigation into alleged Russian interference in the 2016 election to help Trump win the presidency.

Trump's condemnation of Snowden a few years ago demonstrates his contempt of government surveillance and leakers, including those who have been leaking information out of his own administration. He's repeatedly trumpeted and demanded an investigation into a claim that Obama had wiretapped Trump Tower during the 2016 campaign, without providing corroborating evidence.

“Find the leakers,” Trump tweeted in April.

And again Tuesday morning:

Greg Miller and Greg Jaffe contributed to this story.

Read more:

No pardon for Edward Snowden

As a source — and a patriot — Edward Snowden deserves a presidential pardon

Edward Snowden comes forward as source of NSA leaks

U.S., British intelligence mining data from nine U.S. Internet companies in broad secret program