After President Bashar al-Assad of Syria once again attacked his own citizens with poison gas, the civilized world recoiled in horror at images of children writhing in pain and suffocating to death. President Trump voiced this justified outrage at a news conference on Wednesday, and the next day he took swift, decisive action against the outlaw Assad regime. But these strikes did more than simply punish Mr. Assad and deter future attacks; they have gone a long way to restoring our badly damaged credibility in the world.

It’s hard to overstate just how low the standing of the United States had fallen because of President Barack Obama’s failure to enforce his own “red line” against Mr. Assad’s use of chemical weapons in 2013. I was one of the few Republican members of Congress who supported strikes against Syria then. Because of that, I’ve heard from dozens of world leaders expressing their doubts about the security commitments of the United States.

These doubts originated from surprising places. Of course our longtime Arab allies expressed their misgivings. Yet European and even Asian leaders have privately wondered to me whether the red-line fiasco called into question America’s security alliances in their regions. While far removed from the Middle East, they still depend on the United States and the threat of force to defend our mutual interests.

It wasn’t only Mr. Obama’s refusal to act in the moment that undermined our credibility. The fig leaf to justify inaction was an agreement with President Vladimir V. Putin of Russia to remove Syria’s chemical weapons, which Russia and Syria plainly violated from the outset. Yet Obama administration officials continued to celebrate it as a triumph.