Iranian students protest at the University of Tehran during a demonstration | AFP via Getty Images EU urges ‘all concerned’ in Iran to refrain from violence Bloc says it expects ‘right of expression to be guaranteed.’

The EU urged Iran to refrain from any violent crackdown on protesters and condemned the deaths of more than 20 demonstrators in recent days as "unacceptable."

The statement, issued late Tuesday by the high representative for foreign affairs, Federica Mogherini, offered the EU's first formal remarks on the unrest in Iran and came as the country's supreme leader, Ayatollah Ali Khamenei, blamed enemies, including the U.S. and Saudi Arabia, for instigating deadly protests.

The EU's condemnation of the violence, and warning against further violent repression of protesters, highlighted the awkward position of the EU, which has been a staunch defender of the Iran nuclear accord, particularly against criticism from U.S. President Donald Trump.

Trump has used the protests in Iran to amplify his criticism of the government in Tehran, and of his predecessor, Barack Obama, who helped broker the 2015 accord, which ended economic sanctions in exchange for controls on Iran's nuclear program.

In the EU statement, which echoed earlier comments by a spokeswoman, Mogherini urged restraint from violence and demanded that the government in Tehran uphold citizens’ right to free expression.

“We expect all concerned to refrain from violence and the right of expression to be guaranteed, also in light of the statements made by the Iranian Government,” Mogherini said.

A New Year's blog post by Mogherini had highlighted the importance of the nuclear accord, and reiterated the EU's commitment to it. Citing a meeting at the United Nations in September, she wrote: "We acknowledged once again that Iran is implementing the deal, as certified nine times by the International Atomic Energy Agency. The European Union — as a multilateral and reliable power — will continue to work for the deal to be implemented by all sides."

The EU statement made clear that it expects Tehran to also uphold fundamental liberties.

An Iranian government spokesman, lashing out at U.S. support for the protesters, insisted that Iranian citizens enjoyed the right to free speech and assembly unlike in other Middle Eastern countries allied with Washington. Other Iranian officials, including President Hassan Rouhani, have also insisted that citizens are entitled to protest — and it appeared to be those assurances that Mogherini was referring to in her statement.

The Iranian news agency, FARS, said international media had ignored larger pro-government counter-demonstrations in favor of the protests against economic conditions and corruption.

“The enemy has always been waiting for an opportunity and a breach to enter and hit a blow to the Iranian nation," Ayatollah Khamenei said in a speech Tuesday, according to FARS.

Protesters in Mashhad and other cities have expressed anger over poor economic conditions in Iran, including a recent spike in prices, despite the 2015 nuclear accord that ended major international sanctions. More than 20 demonstrators have died in clashes with police, and a government crackdown has intensified in recent days with more than 450 people arrested in Tehran alone, according to news agencies.

Trump wasted no time in blasting the Iranian government on Twitter. "The people of Iran are finally acting against the brutal and corrupt Iranian regime," Trump tweeted. "All of the money that President Obama so foolishly gave them went into terrorism and into their 'pockets.' The people have little food, big inflation and no human rights. The U.S. is watching!"

Mogherini stressed the EU's commitment to fundamental democratic rights.

“For the EU, human rights have always been a core issue in our relationship with Iran. Peaceful demonstration and freedom of expression are fundamental rights that apply to every country, and Iran is no exception,” Mogherini said in her statement.