Former NSA contractor Edward Snowden talks via video link from Russia to a Council of Europe hearing in Strasbourg, France, in 2015. (Frederick Florin/Agence France Presse via Getty Images)

Mark Feldstein, a media historian, is the Eaton Chair of Journalism at the University of Maryland and author of “Poisoning the Press: Richard Nixon, Jack Anderson, and the Rise of Washington’s Scandal Culture.”

This week, when confronted with media revelations about his staff’s contacts with the Russian government, President Trump blamed the messenger. He denounced “low-life leakers,” directed the Justice Department to launch a criminal investigation and vowed revenge: “They will be caught!”

The leaks, he declared, were “Very un-American!

Actually, leaking is as American as Fourth of July fireworks. And just as old and venerable.

America’s grand tradition of revealing secret information about national security matters began in the winter of 1777, when the country’s first whistleblowers exposed a U.S. Navy commander for torturing British prisoners of war. The sailors who disclosed these human rights violations weren’t vilified by their commander in chief. Instead, they received the full support of Congress.

(The Washington Post)

A few years later, President George Washington endured press leaks of what today would be considered classified national security documents: confidential Cabinet minutes, private letters between diplomats, even the verbatim text of a secret treaty with England. Although Washington was “much inflamed,” he didn’t attack the revelations as anti-American, let alone plot vengeance.

During Washington’s presidency, as in those that would follow, the ship of state leaked primarily from the top. Perhaps the most important “low-life leaker” of the day was Secretary of State Thomas Jefferson; he and his allies pushed their policy agenda by publicizing national security secrets in the press.

Jefferson’s rivals responded in kind, slipping confidential diplomatic letters to other newspapers. It became an escalating war of leaks, setting the stage for administrations to come. By the end of his presidency, even Washington had turned into a leaker.

So it would continue for the next two centuries. Administrations complained about national security leaks but generally accepted them as a fact of political life. The press had become a kind of back channel used by government rivals to communicate and compete.

In the 1840s, when President James K. Polk’s official correspondence and secret diplomatic plans were published in the press, he vented in his diary about the “treasonable” disclosures. But instead of facing criminal charges, the leaker (Secretary of State James Buchanan) was elected president.

Similarly, President Franklin D. Roosevelt wanted to prosecute the publisher of the Chicago Tribune for divulging sensitive military secrets during World War II; but in the end, FDR backed down.

Washington, D.C., had become a sanctuary city for leakers.

And with good reason: Leaks are healthy in a democracy. They are an important check on abuse of power, a safety valve that can prevent disasters. At its best, leaking can be a supreme act of patriotism.

Trump complains that “illegal classified” secrets are being passed out “like candy” and wants these “criminal leaks” to be prosecuted.

But Washington’s most important — even heroic — leaks have technically run afoul of the law. FBI deputy director Mark Felt’s Watergate disclosures helped expose criminality in the Nixon White House. Daniel Ellsberg’s revelation of the top-secret Pentagon Papers helped end the Vietnam War. And whatever you think about Edward Snowden and Chelsea Manning, their publicizing of mass government collection of Americans’ phone “metadata” and military killings of civilians raised vital moral issues that deserved public debate.

Of course, some leaks — such as pending troop movements in wartime — can pose legitimate threats to national security. But political security — the covering-up of blunders and crimes by our leaders — has too often been the real reason for condemning leakers.

Paradoxically, leaking has become both systemic and criminalized. America’s transformation during the Cold War into a national-security state produced millions of classified documents and criminal sanctions for exposing them. At the same time, the government’s increasing public-relations sophistication led to a routinized culture in which news reporters were regularly given confidential intelligence to advance the official agenda.

The bizarre result: a government that leaks with one hand and punishes leakers with the other.

Top officials in President George W. Bush’s White House leaked the identity of a CIA operative and classified intelligence indicating that Iraq possessed (nonexistent) weapons of mass destruction — but prosecuted a handful of low-level leakers who caused far less harm with their disclosures. Similarly, the Obama administration launched a crackdown on whistleblowers Manning and Snowden even as it leaked a highly sensitive but self-serving election-year story about its successful cyber-sabotage of Iran’s budding nuclear operations.

To be sure, the facts in these cases vary considerably. But in all of them, punishment fell disproportionately on those who leaked from the bottom of the ship rather than the top. Control, not law-breaking, seemed to be the No. 1 concern.

Trump’s double standard on this issue has been even more glaring. Since the 1970s, he has mastered the art of the leak, personally calling tabloids and hiding behind pseudonyms to plant self-serving stories about his business and personal life. More recently, he praised publication of Hillary Clinton’s campaign emails and encouraged the Russian government to hack into the account she used when she was secretary of state.

Yet this week, Trump accused U.S. intelligence agencies of acting “just like Russia” by leaking compromising information about his administration. The hypocrisy seemed lost on him.

Like Richard Nixon, Trump is thin-skinned, insecure, consumed by grievance, obsessed with enemies and determined to exact revenge. Both men abhorred leaks and whipped up their conservative political bases with anti-media invective. Nixon’s demons, of course, ultimately led to his ruin; whatever short-term political benefit he gained by bashing the press was no match for Mark Twain’s truism: “Never pick a fight with people who buy ink by the barrel.” Like Nixon, Trump’s obituary will literally be written by his journalistic enemies.

So Trump had better get used to media leaks. He’s no longer the boss of a reality TV show who can simply fire those he doesn’t like. Nor is he a king. In a democracy, the people are the true sovereigns. The leakers he denounces as un-American don’t work for him; they work for the American people.

To suggest otherwise is what’s truly un-American.