Istanbul, Turkey (CNN) -- Dignitaries, a red carpet and a child with a bouquet of flowers greeted Iranian President Mahmoud Ahmadinejad when he landed at Istanbul airport in Turkey on Monday. It was perhaps the warmest welcome he has received in weeks.

Ahmadinejad's trip to attend a United Nations summit of the world's poorest countries is his first overseas journey since a public spat erupted between himself and Iran's Supreme Leader, Ayatollah Ali Khamenei.

Top officials and media outlets close to Khamenei have mounted a campaign of criticism targeting Ahmadinejad, while several of his top aides have reportedly been arrested.

The reported arrest of presidential palace prayer leader Abbas Amirifar on charges of "sorcery" is perhaps the best sign of how serious the political feud in Tehran has gotten.

Amirifar produced a controversial film predicting the imminent return of the Shiite saint Mehdi, a messianic prediction that Ahmadinejad often refers to in his speeches.

On Sunday, Ahmadinejad denied reports that Amirifar had been accused of "sorcery."

According to Iran's state-run Press TV agency, Ahmadinejad said: "Those who accuse the government of being influenced by superstitions are 'joking.'"

But as recently as last Friday, the crowd at the state-sanctioned prayer service in Tehran chanted "death to opponents of the supreme leader."

Long-time observers of Persian politics saw the chant, which was broadcast on state radio, as a warning to the embattled president.

Much of the public criticism has also targeted Ahmadinejad's brother-in-law and chief of staff, Esfandiar Rahim Mashaei.

"There's been no question that President Ahmadinejad has been damaged in this apparent power struggle with Iran's supreme leader," said Scott Peterson, Istanbul-based journalist and author of "Let the Swords Encircle Me."

"What is not yet clear is how much damage has been done, and how it will affect Ahmadinejad's final two years in office," he said.

"The scale of Ahmadinejad's political problems are made clear by the charges of sorcery and religious deviation that have been leveled against his chief of staff and some of the closest aides to him," Peterson said.

"Normally such charges in the Islamic Republic would be considered apostasy and can be seen as a serious challenge to Iran's religious system."

The surprisingly public power struggle at the highest levels of Iranian government erupted on April 17, when Ahmadinejad fired Intelligence Minister Heidar Moslehi.

Supreme Leader Khamenei vetoed the move.

For more than a week, Ahmadinejad retreated from the public eye, reportedly refusing to show up for work.

Finally, on May 1, he attended a meeting of his cabinet. But Moslehi was conspicuously absent, reportedly due to a scheduling conflict.

There are signs that Ahmadinejad may have capitulated in his disagreement with Khamenei.

Sunday, Ahmadinejad appeared at cabinet meeting for the first time in a month with the disputed intelligence minister, Press TV reported.

And the Islamic Republic News Agency published a series of photos on Sunday, showing Ahmadinejad seated at the left hand of Supreme Leader Khamenei at a ceremony commemorating the death of the daughter of the Prophet Mohammed.

The president swore allegiance to the leader and stressed his dedication to the principle of Velayat-e-Faqih, or Guardianship of the Supreme Jurisprudence, which forms the bedrock of Iran's Shiite theocratic rule.

And the president's office published the following curt statement on its website Saturday: "Regarding the false accusations and rumors about President Ahmadinejad that certain news sites have published, this news is wrong and it's hereby rejected. Obviously, the official views, opinions, and news about the dear president, is published by the official site, www.president.ir, and all other media is not reliable."