MOSCOW (Reuters) - Less than three months after Vladimir Putin was cast as a pariah over Syria at the last big meeting of world leaders, the Russian president has glimpsed a chance to turn the tables on Barack Obama.
The U.S. president's dilemma over a military response to an alleged poison gas attack in Syria means Obama is the one who is under more pressure going into a G20 summit in St Petersburg on Thursday and Friday.
Obama stepped back from the brink on Saturday, delaying any imminent strike to seek approval from the U.S. Congress.
Yet at a G8 summit in Northern Ireland in June, Putin was isolated over his backing for Syrian President Bashar al-Assad and scowled his way through talks with Obama, who later likened him to a "bored kid in the back of the classroom".
Putin has ignored the jibe and stood his ground over Assad, dismissing Obama's allegations that Syrian government forces carried out a chemical weapons attack on August 21.
Buoyed by growing pressure on the U.S., French and British leaders over Syria, the former KGB spy has also now hit back in comments referring ironically to Obama as a Nobel Peace laureate and portraying U.S. global policy as a failure.
"We need to remember what's happened in the last decade, the number of times the United States has initiated armed conflicts in various parts of the world. Has it solved a single problem?" Putin asked reporters on Saturday in the city of Vladivostok.
"Afghanistan, as I said, Iraq ... After all, there is no peace there, no democracy, which our partners allegedly sought," he said during a tour of Russia's far east.
Denying as "utter nonsense" the idea that Assad's forces would use chemical weapons when they were winning the civil war, Putin looked steely and confident.
After months of pressure to abandon Assad, he is sending a message to the West that he is ready to do battle over Syria in St Petersburg and sees an opportunity to portray the United States as the bad boy on the block.
"Of course the G20 is not a formal legal authority. It's not a substitute for the U.N. Security Council, it can't take decisions on the use of force. But it's a good platform to discuss the problem. Why not take advantage of this?" he said.
"Is it in the United States' interests once again to destroy the international security system, the fundamentals of international law? Will it strengthen the United States' international standing? Hardly," he said.
There was an element of grandstanding in Putin's first public comments on the dispute over the poison gas which killed hundreds of people in areas held by Syrian rebels.
One of his aims is to deflect criticism at this week's meeting of the 20 developed and emerging powers, including all five permanent members of the Security Council, at which Syria is likely to overshadow talks on the global economy.
Putin also seems intent on taking a swipe at Obama, who pulled out of a Russia-U.S. summit that was planned for this week after Moscow defied Washington by granting former U.S. spy agency contractor Edward Snowden a year's asylum.
Putin still risks facing criticism over a law banning "gay propaganda" at the summit, and is accused abroad of clamping down on the opposition to reassert his authority following the biggest protests since he was first elected president in 2000.
But the tension over possible military strikes on Syria has ensured Obama has been the focus of world attention, rather than Putin, in the run-up to the G20 - which will consider issues such as economic growth, unemployment and financial regulation.
There has been no repeat of the sentiment expressed by Canadian Prime Minister Stephen Harper on the eve of the G8 summit. Upset by Russia's position on Syria, he said the G8 group of industrialized countries was in reality the "G7 plus one".
Any hopes in the West that Russia would shift stance because of the use of chemical weapons now look to have been frustrated.
Russian officials have reiterated that Moscow, an important arms supplier to Assad, has the right to deliver such weapons and that their sale does not break international law.
Moscow, which has blocked earlier efforts at the United Nations Security Council to condemn Assad and tighten sanctions on his government, has also made clear it is not about to support moves against Damascus at the United Nations.
Putin says the attack may have been a provocation by rebels fighting Assad, intended to hasten U.S. military intervention, and has used criticism of Washington over Syria to whip up anti-American sentiment and shore up support among Russian voters.
"From Russian officials and certainly the Russian media, there continue to be allegations that the United States has an agenda focused on regime change (in Syria), that the United States is driving tumult in the Middle East for its own ends," a senior U.S. administration official in Washington said.
"There is also a cynical element where anti-Americanism has been successful to rally public opinion."
Putin, in fact, seems emboldened as Obama's problems pile up and some of his allies face difficulties over Syria.
British Prime Minister David Cameron is under pressure after parliament refused to back military action and Obama's decision to seek Congress' approval for strikes has put French President Francois Hollande under pressure to let deputies have a say.
Putin said the British parliamentary vote last Thursday was a sign that even people in countries closely allied to the United States were drawing conclusions from what he depicted as Washington's foreign policy mistakes.
"Even there, there are people who are guided by national interests and common sense, people who value their sovereignty," Putin said.
Any prospect of "shaming" Putin into a change of tack over Syria is also increasingly seen abroad as unlikely to work.
"I don't get the sense that Russia is overly concerned about its international image in this regard," said the senior U.S. administration official. "It takes pride in being independent ... Russia is not timid or bashful when it comes to Syria support."
(Additional reporting by Lidia Kelly and Steve Gutterman in Moscow, Denis Dyomkin in Vladivostok and Matt Spetalnick in Washington; editing by David Stamp)