Russian President Vladimir Putin applauds Friday as he takes part in the Shanghai Cooperation Organization summit in Bishkek, Kyrgyzstan.

WASHINGTON — The U.S. deal with Russia to eliminate Syria’s chemical weapons has pulled the Obama administration into deep waters: the Kremlin’s long-standing drive to put the brakes on American power and to restore Moscow to its place as a pivotal Mideast player.

If Syria, which relies on Russian patronage, signs on, then the deal temporarily would solve a big domestic political problem for President Barack Obama. Russian President Vladimir Putin would walk away with two immense prizes, at the least.

The framework does not settle the larger issue, ending the civil war that has ravaged Syria for more than two years. Nor does it address Obama’s calls for Syrian President Bashar Assad’s departure and his replacement by democratic order in a country that has never known one.

For Obama, the agreement hammered out in Geneva would buttress his inclination to find answers through diplomacy rather than military means.

It could, for a time, distract Americans who had grown critical, or at least doubtful, about his foreign policy bona fides, given White House waffling and course changes on threatened airstrikes against Syria. That was Obama’s declared response to punish Assad’s for what the U.S. says was his use of chemical weapons in an attack last week, killing more than 1,400 people.

Putin, on the other hand, will have taken great strides in showing that Russia must play a critical role in the Middle East, something it surrendered with the collapse of the Soviet Union more than two decades ago.

What’s more, Putin has for the time being shored up Assad. Equally important to the Kremlin, Russian intervention will enhance Putin’s stature as a geopolitical counterbalance to American power.

The deal calls for unspecified U.N. penalties against Syria should Assad fail to comply, but stops short of authorizing a military strike. That would leave Obama in a position of ignoring the world body’s directive should he revert to airstrikes.

“It was a brilliant tactical move” for Russia, said Jonathan Adelman, professor at the University of Denver Korbel School of International Studies.

“It makes them the savior of Syria, and the savior of their closest ally. It kind of highlighted the message that the Americans are clearly, totally unreliable,” he said.

To R. Nicholas Burns, professor of international relations at Harvard’s Kennedy School of Government, the Russian gambit is part of a long-term strategy.

“One of Putin’s abiding objectives for the last decade has been to limit the power and maneuverability of the United States,” said Burns, a former ambassador to NATO and Greece, and a former undersecretary of state for political affairs.

“They don’t want to live in a world where the United States is dominant. If there are opportunities to limit, clip the power of the United States, to harry and harass the United States, they will do it,” he said.

Assad and his father before him have been Moscow’s foremost Arab allies for decades. Much of the weaponry Syria deploys against the rebels fighting to overthrow his government comes from Russia.

Even as evidence mounted that Assad’s military launched the Aug. 21 chemical attack, Russia insisted that the rebels were to blame. Until now, the Russians have used or threatened to use their Security Council veto to block U.N. action to punish Assad.

Despite a civil war death toll above 100,000 in Syria and millions more made refugees, Putin is banking on the world seeing the contrast between his steadfastness in standing with an isolated Syria and Obama’s less than sure-footed handling of the crisis.

Besides calling for Assad’s overthrow on two occasions, Obama had said Assad’s use of chemical weapons would cross a red line. Obama pledged to arm Syrian rebels but the flow of arms has been minimal and sluggish.

He prepared Americans for airstrikes after the chemical attack, had Secretary of State John Kerry deliver an impassioned argument for striking Assad, then pulled back and asked Congress for support. He hasn’t gotten it.

The rebels feel cut adrift, abandoned. In less than a week they went from optimistic expectations of a greater weapons flow and a U.S. air assault to degrade Assad’s forces to the reality of Russia, Syria’s No. 1 ally, involved in a lengthy chemical weapons process with Washington, the rebels’ would-be mentor.

On the opposition front, Obama and Putin appear to share common concern.

While the Syrian uprising began as an internal matter, the rebels were in dire need of military assistance and were far outnumbered. The manpower vacuum has been filled by foreign Islamic extremists.

Neither the United States nor Russia wants to see a strategic country such as Syria come under control of religious extremists. Russia is particularly concerned given its long southern border populated by Muslim countries that were once Soviet republics.

Moscow spent nearly two decades crushing an Islamic uprising in Chechnya, a Russian republic in the Caucasus region in the deep south and not far from Syria. The U.S. worries about the further spread of territory under control of militant Islamists and al-Qaida franchises.

Both Obama and Putin will find satisfaction, for different reasons, in having avoided — again for the time being — a U.S. attack on Syria.

For Putin, the talks bolster Moscow’s global standing and could, either through delay or success, preserve their crucial Middle East ally.

For Obama, a deal would pull him out of a deep political hole, the one he created for himself by declaring a readiness to strike, then pulling back in an attempt to share the responsibility with Congress, which wanted no part of an attack.

But now, should the deal fail to take chemical weapons away from Assad, Obama would again find himself having to decide whether to stand down or act, likely without support of Congress, the American people and a U.N. resolution. All options would weaken him for the rest of his second term.

Even so, supporters claim Obama has gained strength, contending his threat to use force precipitated the Geneva talks between Kerry and Russian Foreign Minister Sergey Lavrov, who jointly announced the deal.

Either way, he seems to have had little choice.

“I think President Obama is absolutely right to walk down this diplomatic path with Putin and to agree initially that we’ll accept the proposal for a diplomatic solution,” Burns said. “He had to do that. If there’s a chance to resolve this peacefully, then we have to take it. But I think this proposal may have lots of internal difficulties and contradictions.”

Burns said the United States “is in such a disadvantageous position that we need to be very tough right now.”

But Putin, too, has a history of extreme ruggedness in global give-and-take, almost always taking more than he will give.