The United States fired a barrage of cruise missiles into Syria Thursday night in retaliation for this week’s gruesome chemical weapons attack against civilians, U.S. officials said.

The move was President Donald Trump’s most dramatic military order since becoming president less than two months ago. The attack was also the first direct American assault on the Syrian government.

The strikes hit the government-controlled Shayrat air base in central Syria, where U.S. officials say the Syrian military planes that dropped the chemicals had taken off. The U.S. missiles hit at 8:45 p.m. in Washington, early morning Friday in Syria.

The surprise U.S. assault marked a striking reversal for Trump, who warned as a candidate against the U.S. getting pulled into the Syrian civil war, now in its seventh year. But the president appeared moved by the photos of children killed in the chemical attack, calling it a “disgrace to humanity” that crossed “a lot of lines.”

About 60 U.S. Tomahawk missiles, fired from warships in the Mediterranean Sea, targeted an air base in retaliation for a chemical weapons attack that American officials believe Syrian government aircraft launched with a nerve agent, possibly sarin.

The president did not announce the attacks in advance, though he and other national security officials ratcheted up their warnings to the Syrian government throughout the day Thursday.

“I think what happened in Syria is one of the truly egregious crimes and shouldn’t have happened and it shouldn’t be allowed to happen,” Trump told reporters traveling on Air Force One to Florida, where he was holding a two-day summit with Chinese President Xi Jinping.

The strike came as Trump was hosting Xi in meetings focused in part on another pressing U.S. security dilemma: North Korea’s nuclear program. Trump’s actions in Syria could signal to China that the new president isn’t afraid of unilateral military steps. even if key nations like China are standing in the way.

Trump has advocated greater counterterrorism cooperation with Russia, Assad’s most powerful military backer. Just last week, the Trump administration signaled the U.S. was no longer interested in trying to push Assad from power over his direction of a conflict that has killed hundreds of thousands of people and led to the worst refugee crisis since World War II.

U.S. military officials sought to portray the strikes as an appropriate, measured response. But the assault still risks plunging America into the middle of Syria’s conflict, complicating the safety of the hundreds of U.S. forces fighting a separate campaign against the Islamic State group in the north of the country. If Assad’s military persists in further gas attacks, the Trump administration might logically pursue increased retaliation.

Russia and Iran, Assad’s allies, pose other problems. Russian military personnel and aircraft are embedded with Syria’s, and Iranian troops and paramilitary forces are also on the ground helping Assad fight the array of opposition groups hoping to topple him.

Before the strikes, U.S. military officials said they informed their Russian counterparts of the impending attack. The goal was to avoid any accident involving Russian forces.

Nevertheless, Russia’s Deputy U.N. ambassador Vladimir Safronkov warned that any negative consequences from the strikes would be on the “shoulders of those who initiated such a doubtful and tragic enterprise.”

Trump’s decision to attack Syria came three-and-a-half years after President Barack Obama threatened Assad with military action after an earlier chemical weapons attack killed hundreds outside of Damascus. Obama had declared the use of such weapons a “red line.” At the time, several American ships in the Mediterranean were poised to launch missiles, only for Obama to abruptly pull back after key U.S. ally Britain and the U.S. Congress balked at his plan.

He opted instead for a Russian-backed plan that was supposed to remove and eliminate Syria’s chemical weapons stockpiles.

Thursday night’s strikes were launched from the USS Ross and USS Porter and landed in the early morning Friday in Syria.

The world learned of the chemical attack earlier in the week in footage that showed people dying in the streets and bodies of children stacked in piles. The international outcry fueled an emotional response from Trump, who appeared to abandon his much-touted “America First” vision for a stance of humanitarian intervention, akin to that of previous American leaders. “I think what happened in Syria is a disgrace to humanity,” he said Thursday.

Trump seemed to rapidly reconsider his feelings about Assad, saying: “He’s there and I guess he’s running things, so something should happen.”

The show of force in Syria raises legal questions. It’s unclear what authority Trump is relying on to attack another government. When Obama intervened in Libya in 2011, he used a U.N. Security Council mandate and NATO’s overall leadership of the mission to argue that he had legal authority — arguments that many Republicans opposed. Trump can’t rely on either justification here.

What also remains unclear is whether Trump is adopting any broader effort to combat Assad. Under Obama, the United States largely pulled back from its support for so-called “moderate” rebels when Russia’s military intervention in September 2015 led them to suffer a series of battlefield defeats. Instead, Obama sought to work with Russia on a negotiated transition.

Trump and his top aides had acknowledged in recent days the “reality” of Assad being in power, saying his ouster was no longer a priority. But the chemical weapons attack seemed to spur a rethink. In Florida on Thursday, Secretary of State Rex Tillerson said of Assad: “There’s no role for him to govern the Syrian people.”