DUBAI - Iran's judiciary has blocked a request by President Mahmoud Ahmadinejad to visit Tehran's Evin prison where a top presidential aide is being held, a further sign of his waning influence in a last year in office.

Ali Akbar Javanfekr, Ahmadinejad's press adviser and head of the country's state news agency IRNA, was sent to Evin in September to serve a six-month sentence for publishing an article deemed offensive to public decency.

He was also convicted of insulting Iranian Supreme Leader Ayatollah Ali Khamenei on his personal website, though it is unclear how or when this happened.

Ahmadinejad's request to visit Evin, made public this month, was seen by Iranian media and commentators as linked to Javanfekr's detention although there has been no official confirmation this was the case.

The judiciary turned down the request on Sunday, saying it was not in the best interests of the country as it faces an economic crisis which parliamentary rivals blame as much on mismanagement by Ahmadinejad's administration as Western sanctions.

"We must pay attention to major issues," prosecutor general Gholam-Hossein Mohseni-Ejei said on Sunday according to the Mehr news agency. "Visiting a prison in these circumstances is a minor issue."

He added: "If we have in mind the best interests of the nation, a (prison) visit in these circumstances is not appropriate."

Ahmadinejad has seen his influence wane within Iran's factionalized political structure following a public spat with Khamenei in 2011.

The feud between the Iran's elected and unelected leaders erupted in public last year after Khamenei, who holds ultimate power, reinstated intelligence minister Heydar Moslehi, who Ahmadinejad had sacked.

Conservative rivals of Ahmadinejad in parliament say his administration has mishandled a currency crisis and other economic fallout from the sanctions levied against Iran's disputed nuclear program.

According to Iranian law Ahmadinejad is not allowed to run for a third term in the June 2013 presidential elections.

Please LIKE our Facebook page - it makes us stronger