(AP) DUBAI, United Arab Emirates - Iran's president hardly seemed like a fading political force at a security summit in Beijing last week. Leaders from China and Russia carved out time to hold private talks with Mahmoud Ahmadinejad and gave him center stage to unleash his pet theories about the unraveling of Western power.
But Ahmadinejad always seems to catch a second wind on the road. It's at home where his political wounds are most visible and his expiration date is already factored into high-stakes calculations.
The one-time favored son of Iran's theocracy - its flame-throwing populist in a common man's wind breaker or bureaucrat's off-the-rack suit - is now limping into his last year in office sharply weakened and in the unexpected position as an outcast among hard-liners.
"It may be hard to believe for those who just pay attention to the theatrics of Iranian politics, but Ahmadinejad has emerged - somewhat by process of elimination - as something of a moderate in relation to the archconservatives in the ruling system," said Salman Shaikh, director of The Brookings Doha Center in Qatar.
"The reformers and opposition have been crushed or silenced," he added. "That leaves Ahmadinejad and his big political ego."
Ahmadinejadlast year with the ruling system, which had helped him rise from the relative obscurity of Tehran's city hall seven years ago and stood by his side in 2009 amid the mass chaos from his disputed re-election.
Yet he still has some political ammunition in reserve. How he uses it will set the tone for Iran's internal policymaking as it struggles with big questions such as: how far to bend in the nuclear standoff with the West, how to counter deepening sanctions and what to do with the combative and ambitious Ahmadinejad after the June 2013 elections to pick his successor.
A pivotal element, analysts say, is whether Ahmadinejad will revive his challenges to the alpha-omega powers of Supreme Leader Ayatollah Ali Khamenei and his backers, led by the Revolutionary Guard. The feud began last year with Ahmadinejad's drive to give the presidency more sway over key policies such as intelligence and foreign affairs - which are firmly in the hands of the clerics.
That fight is lost. He can still, however, battle for a political ally on the presidential ballot next year, which will be Ahmadinejad's last in office because of term limits. He also can attempt to nudge Iran's position in the nuclear talks with the U.S. and other world powers, which are scheduled to resume next week in Moscow.
Ahmadinejad is seen as possibly more open to deals with Washington that would accommodate both sides: allowing Iran to continue some level of uranium enrichment for reactor fuel but giving more room for U.N. inspections. The negotiations, however, are completely overseen by the ruling system. And it's even possible, some analysts say, that Khamenei wants to avoid any possible breakthroughs with the West until Ahmadinejad is out of office - fearing he could use it to gain political mileage.
"Ahmadinejad is a lame duck, and the ruling system wants to keep it that way," said Mehrzad Boroujerdi, a Syracuse University professor who follows Iranian affairs. "They want to keep him on a short leash. He'll yank back, though. It's the classic case of a weak office occupied by a strong personality."
Iran's presidency guides the mainstream economy and many day-to-day functions. But major decisions, from international affairs to military priorities, are controlled by the theocracy. This is where Ahmadinejad made his ill-fated gamble last year.
Dozens of Ahmadinejad's allies were arrested or purged from politics, and he was effectively stripped of his ability to groom a successor. An angry Khamenei even hinted that Iran could one day abandon the directly elected presidency system in favor of a prime minister.
Elections in February reinforced the anti-Ahmadinejad ranks in parliament. In March, Ahmadinejad became the first Iranian president brought before lawmakers for grilling over his policies and confrontations with Khamenei - whose hard-core followers believe is answerable only to God.