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.
Ali Akbar Javanfekr, Mr Ahmadinejad's press adviser and head of the 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 Supreme Leader Ayatollah Ali Khamenei on his personal website, though it is unclear how or when this happened.
Mr Ahmadinejad's request to visit Evin, made public this month, was seen by Iranian media and commentators as linked to Mr Javanfekr's detention, although there has been no official confirmation that this was the case.
The judiciary rejected the request yesterday, saying it was not in Iran's best interests as it faces an economic crisis.
Mr Ahmadinejad's opponents in parliament blame the crisis as much on mismanagement by his administration as on Western sanctions.
"We must pay attention to major issues," prosecutor general Gholam-Hossein Mohseni-Ejei said.
"Visiting a prison in these circumstances is a minor issue."
"If we have in mind the best interests of the nation, a [prison] visit in these circumstances is not appropriate."
Mr Ahmadinejad's influence within the factionalised political structure has waned since a clash with Mr Khamenei in 2011.
He is coming to the end of his second term and is not allowed to run in the June 2013 presidential election.
The feud between Iran's elected and unelected leaders erupted in public after Mr Khamenei, who holds ultimate power, reinstated Intelligence Minister Heydar Moslehi, whom Mr Ahmadinejad had sacked.
Today, Mr Khamenei's representative to the powerful Islamic Revolutionary Guard Corps was quoted as saying that he regretted his past support for the President.
"We did not have the prescience to know what was going on in Mr Ahmadinejad's mind and what he wanted to do in the future," Ali Saeedi Shahroudi told the Etemaad newspaper.
"The slogans he uses now are different from the slogans he used in the past."