DUBAI, United Arab Emirates | Iran's president will likely swagger into New York this week in much the same style as past visits for the annual U.N. General Assembly -- ready to take his jabs at America on its home turf.
But any outward confidence on the big U.S. stage contrasts sharply with his increasingly public power struggles back in Iran that could shape the tone of the Islamic republic for years to come.
President Mahmoud Ahmadinejad -- who was a divisive figure in Iran after his disputed re-election last year - is now the great divider among the hard-line leadership as the threat fades from the battered and dispirited opposition, analysts say.
"They have generally gotten rid of the Green Movement, and now they are fighting among themselves," Mehrzad Boroujerdi, a specialist on Iranian affairs at Syracuse University, referring to the opposition movement.
Just in the past few weeks, Mr. Ahmadinejad was hit with a series of slaps -- including the judiciary commandeering the exit rules for jailed American hiker Sarah Shourd. It adds up to more evidence that the old guard clerics and others are pushing back harder against Mr. Ahmadinejad's political hungers.
Their complaint basically is that Mr. Ahmadinejad is trying to redraw the political flow chart. Since the Islamic Revolution, it's been easy to follow: the ruling clerics on top and the elected officials -- including the president -- notches lower.
Mr. Ahmadinejad appears to be constantly testing the system -- and possibly the patience of the theocracy -- by trying to expand the autonomy of his office in policy decisions and filling key posts. There is also a question of his biggest ally, the hugely influential Revolutionary Guard, and whether it wants to stretch its portfolio even further.
The Guard already controls almost everything of importance in Iran -- from protecting the nuclear program to directing the Basiji paramilitary corps. These were the front-line forces set loose against protesters, who charged that ballot fraud handed Mr. Ahmadinejad another term in office until 2013.
The Guard's widening presence in Iranian affairs is nudging the country -- in some eyes -- closer to the values of the generals and away from the mullahs. It's been a repeated theme of the opposition and Western officials, such as Secretary of State Hillary Rodham Clinton.
Iran's opposition leader, Mir Houssein Mousavi, has warned that Iranian society is becoming "more militarized."
Now there appear to be more rumblings from the top.
A video currently making the rounds on the Internet shows a student leader reading a statement at a gathering with supreme leader Ayatollah Ali Khamenei this month urging Mr. Ahmadinejad to remain true to the "precepts" of the Islamic Revolution.
In the coded language of Iranian politics, it's widely seen as another way for Ayatollah Khamenei to send indirect warnings to Mr. Ahmadinejad to remember who is in charge.
A much clearer rap came last week, when Ayatollah Khamenei forced Mr. Ahmadinejad to cancel the appointments of six special international envoys. Mr. Ahmadinejad apparently had not bothered to clear the postings with the ayatollah, who has warned the president to avoid "parallel efforts" in foreign policy.
There's no suggestion that Mr. Ahmadinejad could be pushed from office by the theocrats. Ayatollah Khamenei made a tactical decision amid the post-election mayhem to embrace the official results and turn his back on the demonstrators.
But the signs of high-level rifts have wide spillover. They bring questions about whether Iran can continue to speak in a unified voice in its disputes with the West over its nuclear program. Or even how much Mr. Ahmadinejad's statements - including his expected interviews and speeches in the U.S. -- are freelance policy or sanctioned by the turbans at the top.