WASHINGTON — In 2013, as President Obama sought congressional support for strikes against Syria in retaliation for a chemical weapons attack, he did not find takers in Senator Mitch McConnell of Kentucky or Representative Paul D. Ryan of Wisconsin, both Republicans.

This week, both men — now the majority leader and House speaker — gave enthusiastic support to President Trump’s missile strike on a Syrian air base for which he sought no such approvals. It demonstrates once again that even in solemn issues of war and peace, politics can shift dramatically depending on who is in the White House. Several other Republicans who were skeptical of Mr. Obama’s proposal also gave Mr. Trump’s strike a thumbs-up.

“I don’t know whether he had in mind knocking out a tent and a couple of camels or what,” Mr. McConnell said Friday, explaining his view that Mr. Obama had lacked the clarity and focus of Mr. Trump on Syria. “But this was a strike that was well-planned, well-executed, went right to the heart of the matter, which is using chemical weapons.”

Fifteen years after Congress voted to wage war against Iraq, lawmakers in both parties remain divided and ambivalent about giving any president its explicit blessing to enter theaters of war, even for limited operations.