PALM BEACH, Fla. (AP) — President Donald Trump's sudden decision to order airstrikes against the Syrian government was an overnight evolution for a president who long warned against deeper American involvement in one of the world's most stubbornly violent conflicts.

As he soberly announced the assault Thursday night, Trump argued that the move was still within the framework of his "America First" foreign policy agenda.

The United States, he said, has a "vital national security interest" in stopping the proliferation of the kinds of chemical weapons the Syrian government used against its citizens earlier this week.

Yet Trump's actions left no doubt that — at least in this instance — his view of America's role in the world has been altered.

Trump is hardly the first president to reconsider his views after assuming the responsibility of controlling the world's most powerful military. But with a major shift coming just 77 days into his presidency, his may be one of the fastest transformations in recent memory.

After spending years warning U.S. leaders that Syria was a dangerous quagmire, Trump is said to have been moved by the gripping images of young Syrian children's listless bodies that were beamed across the world following the chemical attack.

He mourned the "beautiful babies" were among the dozens killed by the deadly gases and accused Syrian President Bashar Assad of having "choked" his own citizens.

His sentiment — the United States' "responsibility to protect" — echoed those often used by some Trump's ardent detractors.

That doctrine, espoused most notably by President Barack Obama's former ambassador to the United Nations Samantha Power, holds that world powers have an obligation to defend civilians from conflict, particularly from their own governments.

Trump campaigned on a wholly different vision for the nation's foreign policy, one that bordered on isolationism and centered on recalibrating trade deals with international partners. He has specifically said the Middle East is one region of the world he hoped to avoid.

Yet in the short term, Trump's decision to plunge the U.S. deeper into the Syria conflict won him plaudits from his own party. Even some Democrats were muted in their response, a signal of how frustration with U.S. inaction in Syria has permeated both parties.

"The question now is what the consequences and reactions will be, and what are the president's strategic and long-range goals and plans with respect to U.S. involvement in Syria," said Sen. Jack Reed, D-R.I., the top Democrat on the Armed Services Committee.

Trump's decision was all the more remarkable for his strident public opposition to launching a strike on Syria when the decision weighed on his predecessor.

In September 2013, Trump repeatedly took to Twitter to urge Obama to not to attack Syria after another chemical weapons attack.

"AGAIN, TO OUR VERY FOOLISH LEADER, DO NOT ATTACK SYRIA - IF YOU DO MANY VERY BAD THINGS WILL HAPPEN & FROM THAT FIGHT THE U.S. GETS NOTHING!," he wrote.

He followed two days later with another tweet declaring, "There is no upside and tremendous downside" to an attack.

Obama nearly ordered strikes, but with little support in Congress he ultimately pulled back. He called for a vote in Congress that never came, then rallied behind a Russian-backed plan to remove Syria's chemical weapons stockpiles — an agreement that appears to have failed, given this most recent attack.

Though Trump castigated Obama for appearing weak and indecisive, he maintained as a candidate that Syria was a morass the U.S. should avoid.

As recently as a week ago, Trump's top diplomats, Secretary of State Rex Tillerson and U.N. Ambassador Nikki Haley, both indicated the U.S. might take a hands-off approach to a civil war that has killed hundreds of thousands of people and forced millions more from their homes.

The long-term implications of Trump's sudden policy shift are deeply uncertain. But his supporters seemed willing to accept his decision.

"President Trump has tonight more than earned a second or third look from a lot of doubters — both at home and abroad," said Kevin Kellems, a Republican strategist who briefly worked on Trump's campaign and also advised former Vice President Dick Cheney. Kellems singled out in particular "the speed and precision of the decision to strike."

In addition to the blunt message sent to Assad, the strikes are also a signal to Russia and Iran, Syria's main benefactors, as well as China, which the U.S. believes isn't doing enough to stop North Korea's nuclear pursuits.

Trump ordered the attack while hosting Chinese President Xi Jinping at his Mar-a-Lago resort in Florida amid an ongoing struggle between Washington and Beijing over how to rein in Pyongyang's nuclear weapons and ballistic missile programs.

"This clearly indicates the president is willing to take decisive action when called for," Tillerson said.____AP Diplomatic Writer Matthew Lee contributed from Washington. Follow Lee at http://twitter.com/APDiploWriter and Pace at http://twitter.com/jpaceDC