Iran's embattled president has backed down from a public dispute with the country's judiciary, a day after his nation's top leader called such spats treason.

In a letter to Supreme Leader Ayatollah Ali Khamenei, President Mahmoud Ahmadinejad pledged to concentrate on overcoming Western economic sanctions instead.

The exchange between the two highlighted a power struggle that the president has been gradually losing. Khamenei backed Ahmadinejad until the president began challenging some of the Supreme Leader's powers. Since then, Ahmadinejad has lost a series of battles, seeing his backers go down to ringing defeat in parliamentary elections this year.

The latest spat also has to do with presidential elections next year to choose a successor to Ahmadinejad.

Khamenei's harsh criticism was seen as a direct strike at Ahmadinejad, who publicly criticized Iran's judiciary chief, Ayatollah Sadeq Larijani, last week for rejecting his request to visit Evin prison, where his top press adviser, Ali Akbar Javanfekr, is being held.

"The government fully welcomes your notice ... (and) won't engage in domestic quarrels and disputes and will patiently tolerate all unkind behavior as before," Ahmadinejad said in the letter to Khamenei, posted on his president.ir website late Thursday.

Ahmadinejad said his government will focus on how to reduce economic pressures from tightened sanctions over Iran's nuclear program.

The U.S. and the European Union intensified sanctions against Iran in July.

The EU imposed an oil embargo against Iran in July, adding to U.S.-led sanctions that prohibit the world's banks from completing oil transactions with Iranian banks, complicating Iran's ability to conduct international commerce.

The West says the sanctions are aimed at forcing Iran to halt its uranium enrichment program, a technology that can be used to produce nuclear fuel or materials for a warhead.

The U.S. and its allies suspect Iran might use its civilian nuclear program as a cover to develop nuclear weapons. Tehran has denied the charges, saying its program is peaceful and geared toward generating electricity and producing radioisotopes to treat cancer patients.

"The nation and the country are under pressure as a result of enemy plans," Ahmadinejad wrote. "My colleagues and I have employed all our energies around the clock to handle the affairs and confront wide-ranging conspiracies by those who wish us ill, to alleviate pressures on the people."

Despite his pledge, he had some implied criticism for his rivals.

"But it requires the contribution of all branches and a sense of their responsibility and cooperation with the government, which is now at the forefront of (fighting the West's) full-fledged economic war," he wrote.

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

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

Iran's ruling clerics hope for tension-free elections that would avoid a repeat of the political turmoil that followed the disputed 2009 presidential vote. That brought charges of fraud and set off street demonstrations.