President Donald Trump's vulgar comments last Thursday at an Oval Office meeting - which he is now somewhat denying, despite highly credible reporting from several people present, including a Democratic senator - have done more than significant moral damage to a nation already terribly divided over race.
They also reverberate through the international scene. This just makes the jobs of American men and women around the world - service members, diplomats, aid workers and so on - much harder, in turn making Americans less safe.
According to several participants in the conference on immigration reform, the President asked why we would want to bring people to the United States from "s***hole" countries, apparently referring to African nations and Central American states like El Salvador. He specifically mentioned our hemisphere's poorest country: "Why would we want more Haitians here?" Leaving aside the questions of character and stability that would cause a US leader to use gutter language in a room full of congressional leaders, there are four significant reasons the use of such thoughtless comments degrades our global security.
The first is the most obvious: In America, we rely on our network of allies, partners and friends around the world to help us create stability in turbulent regions, some of which have produced the terrorist movements that threaten us. Our network goes well beyond reliable allies in the mainly white nations of Europe, personified by Nato. We desperately need partners in Africa, Central America and the Caribbean. This is not about "soft power" or foreign aid - this is about what our soldiers, sailors, airmen and Marines need to do in the field against Boko Haram in Nigeria, al-Shabaab in East Africa and ISIS in Mali, among others. If we can't persuade our partners to help us on the ground because they are offended and confused by presidential comments, homeland security will inevitably suffer.
Similarly, Americans continue to suffer from the flow of narcotics into the US, which has spurred an epidemic of opioid abuse. Much of the drugs pass through Central America and the Caribbean. Haiti and El Salvador are vital partners in fighting the traffickers. When we denigrate them from the White House, we lose the ability to work with them in the field, hurting the efforts of the Drug Enforcement Agency, the FBI, the CIA and other federal entities.
A second troubling aspect of the comments is how they will be seized upon by our opponents as evidence that Americans are racist and disrespectful of other parts of the world. The Russians and Chinese will undoubtedly cite them when courting security and business partners in Latin America, the Caribbean and Africa. Likewise, terrorist groups including Al-Qaeda and the Islamic State in Iraq and Syria - both skilled in propaganda - have a new messaging weapon for recruiting and proselytising.
Third, this kind of language creates leadership challenges within the military. Roughly 25 per cent of the active-duty force are minorities, and nearly 20 per cent African-American. Many of them, or their parents or grandparents, arrived in the US from countries their commander-in-chief has now likened to an outhouse. Their officers up the chain of command will have to try to ignore this, or explain it, or deal with it - I assure you this is the topic of conversation on ships, in barracks and around hangar bays. The military does a good job balancing questions of race and ethnicity and building a force that works together. But this outburst makes that job more difficult, and thus distracts our military leaders from their job of making Americans safer.
Finally, there is a powerful dimension to our security that results from the willingness of outstanding immigrants to join our armed forces. May I introduce you to Second Lieutenant Alix Idrache? He graduated from West Point in the spring of 2016, and a photo of him at his graduation - normally a moment of extreme joy - captured him weeping. When asked why, he said they were tears of joy because, as a young boy in Haiti, he never could have imagined that he would one day stand on the field at West Point, a regimental commander at the top of his class in physics. He is off to fly helicopters for our nation, and I predict a successful career.
This is the other face of immigration, the positive one we don't discuss enough. Do we want border security? Of course. But do we also want more people like Alix Idrache to make the journey to America? I do. But the President's thoughtless words hurt our chances of attracting them.
One charitable interpretation of Mr Trump's comments would be to say that it was no big deal, a casual comment among politicians never meant for the public's ears. But it is often said that the definition of character is who we really are when we think no one is listening. Such words reveal a great deal about our President, his character - and by extension our national character. And in addition to the moral and ethical damage done, there is real harm to our national security as well.
•The writer, a retired US Navy admiral and former military commander of Nato, is dean of the Fletcher School of Law and Diplomacy at Tufts University. His most recent book is Sea Power: The History And Geopolitics Of The World's Oceans.