TEHRAN, Iran - Iranian President Mahmoud Ahmadinejad cut short a two-day visit to Armenia to return home Tuesday, an Armenian spokesman said, at a time when the Iranian leader's has come under criticism even by fellow conservatives for his replacement of the top nuclear negotiator.

It was not known if the interruption of the visit was linked to the controversy. Ahmadinejad may have sought to avoid angering Turkey by visiting a genocide memorial in Armenia.

The Iranian president told Armenian President Robert Kocharian late Monday that he needed to skip Tuesday's planned events because of unexpected developments in Iran that needed immediate attention, Armenian presidential spokesman Viktor Sogomonian said. The spokesman gave no details.

Landing in Tehran on Tuesday, Ahmadinejad insisted the trip was not cut short, saying it had been scheduled to last 22 hours and in fact went 90 minutes over. He called the visit "good."

While the president was in Armenia a day earlier, he was facing increasing criticism at home over the surprise resignation of top nuclear negotiator Ali Larijani, who was replaced by a close Ahmadinejad loyalist.

The resignation over the weekend has been widely interpreted as a victory for Ahmadinejad because it could lead Iran to take an even tougher stance in ongoing nuclear talks with the West. Though a conservative, Larijani was considered more moderate than Ahmadinejad within Iran's hardline camp, and the two men had previously clashed on how to approach the talks.

But Larijani's removal could further undermine Ahmadinejad in Iran. While the Iranian president has drawn tremendous worldwide attention for his fiery rhetoric, he faces criticism at home, including from past supporters, who say he has failed to improve Iran's economy and unnecessarily worsened the standoff with the West. Even some in top echelons of the clerical leadership headed by Iran's supreme leader, Ayatollah Ali Khamenei, have expressed concern.

On Monday, 183 lawmakers, most of them conservatives, passed a measure praising Larijani's performance as nuclear negotiator, a clear sign of displeasure with his departure. A parliamentary group wrote a letter of complaint to Ahmadinejad for failing to inform them of the resignation in advance or consult with them on Larijani's successor.

Saeed Jalili, a little-known deputy foreign minister for European and American affairs considered loyal to Ahmadinejad, is the new negotiator. He, along with Larijani, is due to talk about the nuclear program with the European Union's foreign policy chief Tuesday in Rome.

Conservative lawmaker Heshmatollah Falahatpisheh criticized the changes, saying "the calamity of repeated dismissals and replacements has become a policy in this government, a move that not only has not brought any improvements but also has damaged progress both in the domestic and foreign arenas."

The U.S. and its allies accuse Iran of seeking to develop nuclear weapons. The United Nations has already imposed two rounds of limited sanctions over Iran's refusal to suspend enrichment, and Washington is pressing for a third. Oil-rich Iran says its program is for peaceful purposes including generating electricity.

Larijani backed Iran's uranium enrichment program, but favored diplomacy to resolve the standoff. He negotiated a deal with the UN nuclear watchdog agency to explain outstanding questions over the nuclear program.

On the other hand, Ahmadinejad has vowed not to suspend uranium enrichment even for a single minute and not give up "one iota" of the right to enrich uranium, a technology that can be used to produce nuclear fuel or materials for a bomb.

Mohammad Reza Bahonar, a prominent conservative and Ahmadinejad supporter, praised Larijani as an "outstanding figure," in an indirect criticism of the president, and suggested Ahmadinejad had pushed him out.

"Larijani had almost reached a deadlock in working with the president. Both of them had come to the conclusion that they could not work together," several newspapers quoted Bahonar as saying.

According to Bahonar, Larijani had tendered his resignation three times in the past but Ahmadinejad accepted the resignation the fourth time after Larijani's insistence.

The move also adds to questions over how much support Ahmadinejad has from Khamenei. Larijani reported directly to Khamenei, who has final say in all state issues, and his replacement could not have occurred without Khamenei's consent.

But that consent may not necessarily be a sign of the supreme leader's backing for Ahmadinejad.

Some observers said Khamenei, who has been silent over the changes, may be giving the president more leeway on the nuclear dossier to be in a better position to reel him in if his policies lead to a new round of UN sanctions.

"Larijani's replacement leaves no pretext for Ahmadinejad to justify his failures in the future. His failures, despite being given a free hand, will only facilitate his humiliating exit from Iranian politics," political analyst Hamid Reza Shokouhi said.

Ahmadinejad was elected on a populist agenda in 2005, promising to bring oil revenues to every family, eradicate poverty and tackle unemployment.

But under his rule, Iran has seen dramatic price increases in housing and basic commodities, fueling criticism of the president. Inflation further worsened after a 25 percent hike in fuel prices in May. Some protesters burned down gas stations in June when fuel rationing was imposed.