Secretary of State Rex Tillerson, left, listens as President Trump speaks. (Alex Brandon/Associated Press)

Jim Hoagland is a contributing editor to The Post.

Most of what President Trump has done and said in his brief time in office has bordered on squalid, incompetent or unbalanced. The bold moral clarity of his missile attack against a Syrian air base involved in chemical warfare deepens rather than resolves the mystery of the real character of this president.

Perhaps this is a moment similar to the one Ronald Reagan faced when confronted early in his presidency with a strike by the nation’s air-traffic controllers. Aides clustered around Reagan to warn him of the complexity and dangers of trying to break the work stoppage.

“It is not complex,” Reagan is reported to have responded. “It is simple. They took an oath not to strike, and they broke it.”

It helped Reagan that he had as his transportation secretary Drew Lewis, who was experienced in national transport and who had the president’s trust. Lewis’s wholesale firing of the air-traffic controllers sent a strong “don’t mess with us” message to potential adversaries at home and possibly abroad.

I suspect that Trump had something like that deterrent effect in mind as he ordered the missile strikes shortly before he sat down with Chinese President Xi Jinping in Palm Beach to discuss the urgent threat to global stability presented by North Korea’s nuclear weapons program. It is much more difficult now for Kim Jong Un — and Xi — to dismiss Trump’s warnings as bluster.

But there are also grounds to hope that Trump is absorbing the lessons of whom he can trust — and whose advice he needs to avoid — in the motley crew he has gathered around him at the White House and in his Cabinet. The missile strike appears to have been carried out with precision and discipline under his highly able defense secretary, Jim Mattis.

This former Marine general and scholar of war will not have been pushed into mounting a tactical strike for message-sending purposes. He will have thought through the strategic consequences and follow-through steps the missile strike demands.

Mattis and Secretary of State Rex Tillerson know the Arab, Sunni-led regimes of the Middle East well. Unlike the anti-Muslim activists on Trump’s White House staff, they are well-positioned to fashion a Middle East policy that should recognize and respond to the real dangers that Iran and Syria pose, without letting their Sunni clients’ fears of, and paranoia about, Shiites lead the United States deeper into dangerous quagmires like the civil war in Yemen.

Syria now also becomes the crucible for U.S. engagement with Russia under Trump. The sharp Russian criticism of the U.S. action and Moscow’s defense of Bashar al-Assad’s regime should undermine Vladimir Putin’s efforts to co-opt Trump into a treacly personal relationship that would serve the Russian’s purpose. Perhaps Trump will come to see the wisdom in Charles de Gaulle’s adage that nations do not have friends. Instead, they have interests.

In his statement announcing the U.S. retaliatory assault on the airfield from which the chemical attack that killed at least 80 Syrian civilians was launched, Trump characteristically emphasized his personal revulsion and horror at the images of the gas attack.

But he also identified the “vital national security interest of the United States to prevent and deter the spread and use of deadly chemical weapons.” It is a clear commitment to principle that has been uncommon in his presidency. He should be encouraged by those around him — and by America’s allies abroad — to keep that commitment at the forefront of his thinking, and to expand it to nuclear and biological weapons as well.

A missile strike does not a policy or a worldview make. Giving this spasm of violence real meaning will depend on Trump showing a consistency, discipline and attention to detail that have been foreign to him in two-plus months in office.

He has instead publicly shown a blithe inability to care about the consequences of what he says and does. He has seemed content to say, tweet or do whatever pleases him at the moment, and let others clean up after him.

But presidents, like all humans, are the product of their experiences as well as the creature of the character they bring into office. I doubt that Trump will ever be the kind of person that many of us can admire. His blatant disregard for his monumental conflicts of interest — his surrender to greed, in other words — is too great for that. But if he can learn to let people who know what they are about be about it, there may be hope for him yet.