U.S. Secretary of State Mike Pompeo on Saturday condemned what he called Iran’s testing of a medium-range ballistic missile in violation of the 2015 international agreement on the Iranian nuclear programme, from which Washington has withdrawn.

“Missile tests … are carried out for defence and the country’s deterrence, and we will continue this,” Brigadier- General Abolfazl Shekarchi, spokesman for Iran’s armed forces, was quoted as saying by the semi-official Tasnim news agency.

“We will continue to both develop and test missiles. This is outside the framework of (nuclear) negotiations and part of our national security, for which we will not ask any country’s permission,” Shekarchi said.

He did not confirm or deny Iran had tested a new missile.

Iranian Foreign Ministry spokesman Bahram Qasemi also said Iranian missiles were purely defensive and added: “There is no Security Council resolution prohibiting missile programme and missile tests by Iran.”

U.N. Security Council resolution 2231 enshrined Iran’s 2015 nuclear deal with Britain, China, France, Germany, Russia and the United States in which Tehran curbed its disputed uranium enrichment programme in exchange for an end to international sanctions.

The resolution says Iran is “called upon” to refrain for up to eight years from work on ballistic missiles designed to deliver nuclear weapons.