Secretary of State Mike Pompeo has consistently attacked the media.

The job of a US diplomat is to support free speech and press freedom worldwide.

Pompeo's attacks on the media undermine that message and are a threat to a free press around the world.

Brett Bruen was the director of global engagement in the Obama White House and a career American diplomat. He runs the crisis-communications agency Global Situation Room.

This is an opinion column. The thoughts expressed are those of the author.

Visit Business Insider's homepage for more stories.

I dealt with a lot of difficult journalists during my diplomatic career.

There were those who prodded and pursued what at the Embassy believed were irrelevant issues. Some really seemed to be pushing your buttons to make a story of your overreaction. Yet, I always saw a key part of my job as defending their right to run us foreign service officers through the ringer and write what they would.

Over the course of his time at the State Department, Secretary Mike Pompeo has had a pretty strained relationship with journalists. Sometimes it has spilled over into outright hostility and harassment.

The latest and most prominent case involved NPR's Mary Louise Kelly. This worrisome pattern is about much more than pushing the limits of propriety and Pompeo's temper.

There is a reason diplomats and people representing America abroad placed the principle of press freedom over the immediate pressure to advance our policies. These foreign journalists were the same ones who posed tough questions of their leaders. Even if they weren't objective or able to scrutinize others in the same way, our willingness to engage set a powerful example.

Attacking reporters also bruises those who support us and what we stand for around the globe. Berating the press equally blemishes our standing on the world stage. Blocking them also blocks our ability to pressure democratically-deficient leaders. In short, Pompeo's troubling treatment of the journalists that cover him ends up putting American interests abroad in real trouble.

Setting a bad example

Pompeo's treatment of Kelly and other journalists gives comfort and cover to those who seek to avoid scrutiny. Leaders in countries who are actively trying to suppress free speech will point to Pompeo's example when asked hard questions about their human rights record. These leaders will parrot his lines about "getting facts wrong," even when they are demonstrably true.

Rather than leading on freedom of speech, Secretary Pompeo's actions will set a dangerous precedent. As our Secretary of State criticizes reporters for just doing their job, more journalists living under harsher regimes will be sent to jail, fewer abuses of power will be uncovered, and more threats and attacks on the press will take place.

By ceding the moral high ground on the treatment of the press, Pompeo endangered reporters in other countries in a way that is hard to fully appreciate unless you have tried to report on tough issues, in tough places, with tough guys in charge.

Worries beyond the media

Foreign leaders won't only employ increasingly evasive answers for journalists. They will feel less obliged to tell our diplomats the full and frank story.

When I was serving as a diplomat in Madagascar, a coup leader threatened to shut down an opposition radio station. The station asked me to do an interview at their studios. It was a dangerous mission and I had to be accompanied by diplomatic security. The French Embassy called to tell me it was a provocative move and I shouldn't go. Yet, that's what we did. I spent an hour on air talking about the importance of press freedom.

By standing up for press freedom, American diplomats can set an example for the world and show leaders who oppose free speech that the US won't allow them to silence their people.

The lack of respect for free speech will also hurt relations with our allies and Pompeo's own department.

I've heard from former colleagues still in the Foreign Service about Pompeo's tendency to lose his cool when subordinates present him with information that is inconsistent with his interests. This means important issues are just not being raised to the top level and problems are left to percolate.

And it's likely there will be an increasing reluctance by our allies to pass on information or views they know are incongruent with Pompeo or Trump's perception, to the detriment of the US's relationship with our allies.

Trump is known for his tirades against the press. Overseas, many dismiss it as a directed mainly for domestic consumption. Yet, what our top diplomat says and does is widely seen and sets an example around the world for other leaders.

The Secretary can still straighten things out. An apology to journalists would go a long way. I know how powerful admitting mistakes and asking forgiveness can be for American diplomacy. It would earn him and our country badly needed goodwill.

Reflecting on and recommitting himself, along with the State Department, to advancing press freedoms around the world would send a strong message. He should set new guidelines for how he and the diplomatic corps conduct interviews and engage with the media. Make an effort to actually answer, not avoid questions or attack the questioner.

Particularly as Trump careens from crisis to crisis, the world is looking for reassurance from Mike Pompeo. His mismanagement of relations with the media are making matters much worse. If the press, foreign leaders, even some people in his own department don't trust his word and are turned off by his tactics, the probability for problems is high.

Indeed, the security and strength of journalists directly impacts our national security. In order to avoid a crisis of confidence in our leadership and a heightened risk of global conflict, we need to see a little less self-serving swagger and far more support for press freedom from the Secretary of State.