Dissent within Iran\'s regime was back in the spotlight on Tuesday after President Mahmoud Ahmadinejad hit back at the judiciary chief for denying him access to Tehran\'s notorious Evin prison. The government website on Monday published Ahmadinejad\'s harshly-worded letter to Ayatollah Sadeq Larijani which criticised the judiciary for not allowing the president to visit Evin, where his press adviser has been held for nearly a month. Ali Akbar Javanfekr, who heads the official IRNA news agency and state media group, was arrested in September as the president was out of the country delivering a speech to the UN General Assembly in New York. He was sent to Evin on a six-month sentence after being convicted of insulting Iran\'s supreme leader Ayatollah Ali Khamenei and of publishing material offensive to Islam and public morality. Citing articles of the constitution, Ahmadinejad insisted it was his right to visit a prison, while calling the ruling against Javanfekr \"unjust.\" Ahmadinejad had planned a visit on October 8 to Evin, which holds many prominent political prisoners. But the visit was \"postponed\" by the judicial authority in charge of Iran\'s prisons. Judiciary officials have justified the decision by suggesting Ahmadinejad\'s request was a publicity stunt to defend Javanfekr. Chief prosecutor Gholam Hossein Mohseni Ejeie said on Sunday that the timing of the request was inappropriate, given Iran\'s economic plight, worsened by draconian Western economic sanctions over Tehran\'s disputed nuclear programme. Ahmadinejad responded in his letter by sharply challenging the impartiality of the Islamic republic\'s justice system. \"When you can accuse the president so easily, how can one expect ordinary people to benefit from legal proceedings?\" Ahmadinejad asked. He has repeatedly accused the judiciary of being used by his political foes to harass his inner circle and those who supported him during political infighting in the spring of 2011, when he lost a power struggle with Khamenei. The judiciary and the ultra-conservatives hit back at the president, saying he was violating the separation of powers in the Islamic republic. Larijani had postponed Ahmadinejad\'s prison visit © AFP Behrouz Mehri In the letter, Ahmadinejad justified his request by linking it to Iran\'s economy, which is struggling with inflation, unemployment and an ever-weakening currency. \"Resolving the country\'s persistent economic problems requires -- in addition to economic measures -- a review of the way justice is implemented and the way certain individuals involved in economic corruption are prosecuted,\" he said. The phrasing suggested that the judiciary was sympathetic to people close to government opponents who might be involved in financial scandals. The publication of the letter, which was a response to a letter Larijani sent Ahmadinejad denying him the Evin visit and marked \"top secret\", sparked criticism both from conservatives and reformists. They accused the president of seeking to divert attention from economic problems and creating fresh tension within the regime. It also fuelled renewed skirmishes between the government and parliament, which is critical of Ahmadinejad\'s management of the crisis. Lawmakers have since July been threatening to impeach several ministers. Ahmadinejad, whose second and final term ends in 2013, has in response accused the conservative-dominated parliament of aiming to wreck his government\'s policies, an allegation which caused an uproar from his ultra-conservative opponents. The tensions forced Khamenei, who has the final say on matters of state, to publicly call for a political truce last week, saying \"calm\" must be restored in the country because defeating Western sanctions is the priority. But Hojatoleslam Ali Saeedi, Khamenei\'s representative in Iran\'s powerful Revolutionary Guards, on Monday accused Ahmadinejad of trying to overstep his authority. \"The problem is presidents confuse their roles and authority with that of the supreme leader... and they want do more than what is in their legal authority,\" Saeedi said.