When President Donald Trump declared the media the "enemy of the American people," I called it an outrage. Well, The New York Times seems to be working overtime to prove me wrong and Trump right.

In a front-page story, the Times recently exposed the identity of the covert operative running the CIA's Iran operations as Michael D'Andrea — noting that he was "known as the Dark Prince or Ayatollah Mike, nicknames he earned as the Central Intelligence Agency officer who oversaw the hunt for Osama bin Laden and the American drone strike campaign that killed thousands of Islamist militants and hundreds of civilians."

The Times also reported his alleged role in the killing of a senior Iran-backed Hezbollah terrorist leader. "Operatives under his direction played a pivotal role in 2008 in the killing of Imad Mugniyah, the international operations chief for Hezbollah, the Iranian-backed Shiite militant group based in Lebanon," the Times reported.

Publication of this information, one former senior agency official told me, puts D'Andrea's life at risk. "Anytime you expose the name of an officer working undercover in sensitive covert-action programs like counterterrorism and Iranian operations, it exposes him to being targeted for assassination," this official said, adding, "The fact that the Times article tied him to the assassination of Mugniyah puts him potentially in the crosshairs."

Even if D'Andrea does not travel to the region, that does not put him out of Iran's reach. After all, in 2011 the United States broke up an Iranian plot to assassinate the Saudi ambassador in Washington by bombing him while he dined at Cafe Milano in the heart of Georgetown. D'Andrea is leading CIA operations against a regime that was willing to set off a bomb in our nation's capital. If his appointment does signal "a more muscular approach to covert operations" against Tehran by the Trump administration, Iran now knows against whom to retaliate.

The Times's reckless actions endanger not only D'Andrea, but his family as well. The Times story also discussed details about D'Andrea's wife, noting that she is Muslim, that they had met while "on a C.I.A. posting overseas" and that he had converted to Islam to marry her. The day after the Times's story ran, a Tehran-based blog published a post titled "CIA Agent Ayatollah Mike's Face Revealed," which included photographs of both D'Andrea and a woman the blog described as his wife and identified by her full name.

The Times justified its shameful exposure of D'Andrea's new role by pointing out that "his identity was previously published in news reports." So, you may ask, which major news organization published his identity in the first place?

Answer: The New York Times.

In 2015, the paper publicly named him as the "head of the C.I.A. Counterterrorism Center" and "architect of the targeted killing program." The Times noted in that story that the CIA had asked that D'Andrea's name and the names of other top agency officials not be published, but the Times refused "because they have leadership roles in one of the government's most significant paramilitary programs and their roles are known to foreign governments and many others."

To its credit, when The Post first wrote about D'Andrea in 2012, the paper withheld not only his real name but also his age and even his full cover identity — referring to him only as "Roger" (the first name of his cover identity) — in order to protect him.

There is always a tension between the public's right to know about the activities of its government and the need for secrecy in the national security realm. Americans can disagree about whether publishing classified information, particularly that which could endanger sources and methods, is ever warranted.

But there is simply no excuse for exposing the names of covert operatives. These individuals are risking their lives for our country, and their anonymity is as critical to their safety as body armor is to an infantry soldier.

Marc Thiessen, a fellow with the American Enterprise Institute and former chief speechwriter to President George W. Bush, writes a weekly column for The Washington Post.