Iran's judiciary has rejected a request by President Mahmoud Ahmadinejad to visit Tehran's notorious Evin prison, its spokesperson said on Sunday, calling the request's timing inappropriate.

"As we are faced with special circumstances and the country's priorities are the economy and people's living conditions, all authorities should focus on solving key issues ... visiting a prison is extraneous," said chief prosecutor Gholam Hossein Mohseni Ejeie.

"More than seven years of his presidency have passed, and no request was made during that time," he said, according to the ISNA news agency on Sunday.

Mohseni Ejeie, who also acts as the judiciary's spokesperson, suggested that Ahmadinejad's sudden interest in Evin was linked to "a person affiliated to [the government] in prison" - an allusion to the president's press adviser, Ali Akbar Javanfekr.

Javanfekr, who heads the official IRNA news agency and state newspaper Iran, was arrested in September and sent to Evin for a six-month sentence after being convicted of publishing material offensive to Islamic codes and public morality.

'Political dimension'

He has long been targeted by hardline judges and ultra-conservative figures who see him and the president as trying to undermine religious principles.

Mohseni Ejeie said the timing of president's request suggested there was "a political dimension" to it. He added: "In this situation, it is not appropriate."

According to Iranian media, Ahmadinejad had planned a visit on October 8 to Evin, most of whose inmates are political prisoners. But the visit was "postponed" by the judicial authority in charge of the country's prisons.

The refusal to allow Ahmadinejad's visit is another sign of tensions that have marked relations between the presidency and the judiciary, which is controlled by hardliners close to the supreme leader, Ayatollah Ali Khamenei.

The tensions have repeatedly sparked public controversy, with Ahmadinejad and his entourage accusing the judiciary of being used by his political opponents to imprison people close to the president and put pressure on him.

The judiciary, meanwhile, has hit back at the president, accusing him of violating the separation of powers in the Islamic republic.