The following piece was first published on foreignpolicy.com on May 23, 2013.

The investigation and potential indictment of investigative journalists for the crime of doing their jobs well enough to make the government squirm is nothing new. It happens all over the world, and is part of what the Obama administration has fought against in championing press and Internet freedom globally. By allowing its own campaign against national security leaks to become grounds for trampling free expression, the administration has put a significant piece of its very own foreign policy and human rights legacy at risk.

The United States has always seen and styled itself as a global standard-bearer on free expression, and never more so than during the last four years. The U.S. Constitution and First Amendment offer the most protective standard for free speech in the world. In June 1992, the United States even lodged a “reservation” or exception to a key provision of the International Covenant on Civil and Political Rights, governing what categories of expression can be banned, on grounds that the global treaty doesn’t go far enough in safeguarding speech. U.S. diplomats tout the reservation with pride, noting that virtually every other country in the world is more tolerant of limits on expression.

The Obama administration has made the promotion of free speech a signature of its own foreign policy. Upon joining the United Nations’s Human Rights Council in Geneva for the first time in 2009, the United States’s maiden initiative in September 2009 was a resolution on free expression. The administration waged a successful two-year campaign to put an end to U.N. resolutions that sought to ban the so-called “defamation of religion,” arguing that the prohibitions conflicted with international norms on free speech.

The administration was quick to identify the risks to free expression online, and to position itself as a primary defender of digital freedom. In 2011, for the first time ever, Washington hosted the U.N. World Press Freedom Day commemoration. It put digital freedom at center stage, inviting bloggers and journalists from all over the world to discuss the challenges they face. To mark the occasion, the State Department press release voiced concern “about the determination of some governments to censor and silence individuals, and to restrict the free flow of information.”

Secretary of State Hillary Clinton put both personal political capital and financial resources behind an effort to promote free expression online. In a December 2011 speech in The Hague, Clinton decried governments for wanting to “keep what they like and which doesn’t threaten them and suppress what they don’t” and called for stepped-up efforts to defend and protect journalists and bloggers. In 2012, she stated, “when a free media is under attack anywhere, all human rights are under attack everywhere.” The State Department documented these attacks in its own annual human rights country reports, calling out Ecuadorean President Rafael Correa for verbal attacks on specific journalists and the government of Ethiopia for using counterterrorism laws as an excuse for persecuting writers. Late last year, in one of her final speeches in office at a meeting of the Organization for Security and Cooperation in Europe, Clinton called out Belarus and several Central Asian countries for intimidating journalists and restricting online expression while admitting “every participating state, including the United States, has room for improvement.”

The commitment did not stop at Foggy Bottom. In a message of his own last spring, the president “call[ed] on all governments to protect the ability of journalists, bloggers, and dissidents to write and speak freely without retribution and… recogniz[e] the vital role of a free press and tak[e] the necessary steps to create societies in which independent journalists can operate freely and without fear.” In the last few years the United States has spent tens of millions annually to train and support journalists, human rights groups, and cyberactivists on Internet freedom and methods to secure online communications.

Living up to such lofty rhetoric and ambition has not been easy. The Obama administration’s response to the WikiLeaks episode and its determination to pursue capital offense charges against Private Bradley Manning after his guilty plea have led to cries of hypocrisy. The administration’s support for legislation and policies that would afford federal agencies broad power to carry out surveillance, circumvent privacy and security systems, and intercept online communications without a warrant from a court have met with staunch criticism from open Internet advocates, sometimes prompting the White House to reverse course. While the president has said that civil liberties must not be traded away in the name of security, his aggressive approach to prosecuting national security leaks within the administration’s own ranks has put the rights of those targeted in jeopardy, and risks chilling the free flow of expression and government criticism far more broadly.

Revelations during the last week of government investigations of the Associated Press and of Fox News journalists only deepen the contradictions. Disclosure that the FBI officials viewed Fox reporter James Rosen as a candidate for potential prosecution as a co-conspirator in unlawful leaks over North Korean nukes, that they searched his emails and even began asking questions about phone lines connected to his parents have made international news. In his 2012 World Press Freedom Day release, President Obama spotlighted jailed Vietnamese blogger Dieu Cay and Eritrean journalist Dawit Issak by name, putting a human face on the victims of government overreach and helping make their plight visible worldwide. The naming and photographs of Rosen and his targeted colleagues William La Jeunesse and producer Mike Levine have likewise struck home with the media and the public.

It will take many months to fully expose the actions of the FBI and the Justice Department in targeting journalists, and to determine how the damage can be mitigated and prevented in the future. What has been revealed thus far, though, is already enough to tarnish America’s global credibility in pressing for media freedom. The next time U.S. diplomats try to push for greater protection for journalists in Turkey or Russia, the AP and Fox scandals will be thrown back in their faces. When they decry government surveillance of the media in China or Iran, those governments will point a finger back to Washington. While U.S. officials can and will point out that outrage and national debate over these scandals itself attests to the degree of press freedom enjoyed in the United States, that won’t be enough to defeat the charge of hypocrisy and eroded U.S. credibility.

And the issue goes beyond free speech. The U.S. government remains leery of having the lens of global scrutiny over human rights practices trained on its own conduct. While the State Department’s report on country performance in addressing trafficking in persons includes a chapter on America’s own practices, the Department’s human rights report still leaves out the United States. And while U.N. human rights rapporteurs covering many topics are welcomed to U.S. shores, those requesting to visit Guantánamo and meet privately with the detainees there have never been allowed. When foreign governments use diplomatic meetings to raise issues like Guantánamo or over-incarceration in the United States, American officials tend to bristle or simply to throw up their hands at the improbable notion that the views of the State Department, much less those of a foreign government, would influence the conduct of the FBI, the Prisons Bureau, or—still more outlandish—the Pentagon or intelligence officials responsible for detainees.

Part of the reason for this disconnect is structural. Because the United States is not used to viewing its own behavior through the filter of international human rights obligations, relatively little thought is given to the implications of a loudly proclaimed administration commitment to advancing press and Internet freedom on the conduct of U.S. domestic agencies. The idea that the United States better make sure the nose of its own far-flung bureaucracy is clean before—or at least while—it sniffs out the abuses of others is a mostly unfamiliar one. The Justice Department and FBI officials responsible for targeting the Fox and AP journalists probably didn’t get a memo saying that the president and secretary of state had called out other countries for spying on and seizing the records of journalists. It will be interesting to learn whether the instructions they received on investigating the national security leaks stressed the importance of respecting the bounds of the First Amendment. There are representatives of the Justice Department that take part in representing and defending the U.S. human rights record globally, working alongside colleagues from the White House, State Department, and other agencies. But their role has focused more on asserting the strengths of America’s record than on addressing its weaknesses. Until they are empowered to drive forward human rights compliance within the Justice Department and the rest of the executive branch, their role is more accurately described as packaging rather than promoting human rights performance.

No government will ever meet the standard of 100 percent principled consistency in its behavior. But until the United States accepts that it is bound not only by U.S. law but also by international human rights obligations in areas including freedom of speech, the Obama administration—and its successors—are likely to continue to fall short in fulfilling at home the obligations it demands of others abroad.