Updated

Iran's supreme leader warned government officials and politicians Wednesday against turning their disputes into a public discussion, calling it "treason" against the state.

Ayatollah Ali Khamenei's comments were a direct jab at embattled President Mahmoud Ahmadinejad, who publicly lambasted Iran's judiciary chief last week for rejecting his request to visit Evin prison.

Ahmadinejad accused the judiciary of "unconstitutional" behavior, claiming that as Iran's president he did not need permission to visit the prison. Judiciary chief Ayatollah Sadeq Larijani fired back, saying Ahmadinejad does not understand his constitutional powers.

Khamenei, who has the final say on all state matters in Iran, said that provoking political differences ahead of presidential elections, scheduled for June 14, is "treason."

"One of the harmful cases is differences among authorities, and worse than that is taking it to the public. I warn the officials and the heads of branches (of power) to be careful and not take their differences to the people," Khamenei said in a speech broadcast on state TV Wednesday.

Larijani wrote a confidential letter to Ahmadinejad earlier this month rejecting the president's demand to visit Evin where his top press adviser Ali Akbar Javanfekr is being held. Javanfekr was jailed last month after being convicted of publishing material deemed insulting to Khamenei.

But the president revealed the contents of the note and publicly criticized Larijani for barring him from visiting Evin.

Iran's State Prosecutor Gholam Hossein Mohseni Ejehi said the judiciary rejected Ahmadinejad's request because the president's planned visit appeared to be politically motivated. Ejehi asked why the president never asked to visit Evin during his seven years as president but wants to go there now that his close aide is behind bars.

Ahmadinejad originally had the backing of the clerics, but the support broke down over his perceived challenge to the authority of Khamenei last year. Since then, Ahmadinejad has rapidly lost his political clout.

Ahmadinejad and Iran's powerful clerics have long had their differences, and the conflict has intensified ahead of next year's presidential elections. Ahmadinejad cannot run for another term but wants to influence the race to pick his successor. In parliamentary elections earlier this year, his supporters were soundly defeated.

"The recent exchange of letters and their contents were not important at all but these disputes should not be made public as it gives ammunition to foreign media and enemies to create controversy," Khamenei said. "From today to election day, whoever willfully takes disputes to the people and uses their sentiments to provoke differences has definitely committed treason against the state."

Khamenei's remarks likely reflect hopes for tension-free elections that would avoid a repeat of the political turmoil that followed the 2009 disputed presidential vote that brought charges of fraud and set off street demonstrations.

Iran's establishment is wary of public political clashes at a time of tightened Western sanctions that have squeezed Iran's economy.

In an indication of the sanctions' impact, the Central Bank of Iran banned all export of gold without its explicit approval to avoid a shortage of the precious metal.

Senior central bank official, Mohammad Reza Naderi was quoted by the semiofficial Mehr news agency on Wednesday as saying that the new restriction has been imposed because of currency fluctuations.

Iran's currency, the rial, lost about 50 percent of its value earlier this month. The currency's nosedive has been blamed on a combination of government mismanagement and the bite from tightened sanctions imposed over Iran's nuclear program, which the West fears is aimed at producing a nuclear weapon.

Iran denies the charge, insisting its uranium enrichment program is only for peaceful purposes, such as fuel generation.