DUBAI (Reuters) - Iran said on Wednesday it had test-fired a new ballistic missile, prompting a tough response from a senior adviser to U.S. President Donald Trump.

National security adviser General Michael Flynn (R) delivers a statement next to Press Secretary Sean Spicer during the daily briefing at the White House in Washington U.S., February 1, 2017. REUTERS/Carlos Barria

Iran’s defense minister said the test did not breach the Islamic Republic’s nuclear agreement with world powers or a U.N. Security Council resolution endorsing the pact,

Iran has test-fired several ballistic missiles since the nuclear deal in 2015, but the latest test was the first since Trump entered the White House. Trump said during his election campaign that he would stop Iran’s missile program.

“The recent test was in line with our plans and we will not allow foreigners to interfere in our defense affairs,” Defence Minister Hossein Dehghan told Tasnim news agency. “The test did not violate the nuclear deal or (U.N.) Resolution 2231.”

Trump’s national security adviser, Michael Flynn, said the United States was putting Iran on notice over its “destabilizing activity” after it fired the missile.

“As of today, we are officially putting Iran on notice,” Flynn said, without explaining exactly what that meant.

Flynn said the missile launch defied the U.N. resolution that called on Iran not to undertake any activity related to ballistic missiles designed to be capable of delivering nuclear weapons.

A U.S. official said Iran had test-launched a medium-range ballistic missile on Sunday and it exploded after traveling 630 miles (1,010 km).

The Security Council held an emergency meeting on Tuesday and recommended the missile testing be studied at committee level. The new U.S. ambassador to the United Nations, Nikki Haley, called the test “unacceptable”.

Iranian Foreign Minister Mohammad Javad Zarif said on Tuesday that Tehran would never use its ballistic missiles to attack another country.

Some 220 Iranian members of parliament reaffirmed support for Tehran’s missile program, calling international condemnation of the tests “illogical.”

“The Islamic Republic of Iran is against weapons of mass destruction, so its missile capability is the only available deterrence against enemy hostility,” the lawmakers said in a statement carried on state media on Wednesday.

The state news agency IRNA quoted Ali Shamkhani, head of Iran’s National Security Council, as saying Iran would not seek “permission from any country or international organization for development of our conventional defensive capability”.

The Security Council resolution was adopted to buttress the deal under which Iran curbed its nuclear activities to allay concerns they could be used to develop atomic bombs, in exchange for relief from economic sanctions.

The resolution urged Tehran to refrain from work on ballistic missiles designed to deliver nuclear weapons. Critics say the resolution’s language does not make this obligatory.

Tehran says it has not carried out any work on missiles specifically designed to carry nuclear payloads.

The test on Sunday, according to U.S. officials, was of a type of missile that had also been tested seven months ago.

Iran has one of the Middle East’s largest missile programs but it has been dogged by a poor record for accuracy.

However, Hossein Salami, deputy head of Iran’s Revolutionary Guards, said on the day of the test that the country was now one of the few whose ballistic missiles were capable of hitting moving objects.

This would enable Iran to hit enemy ships, drones or incoming ballistic missiles.

Some of Iran’s precision-guided missiles have the range to strike its regional enemy Israel.

On Monday, Israeli Prime Minister Benjamin Netanyahu called Iran’s new missile test a “flagrant violation” of the U.N. resolution. He said he would ask Trump in their meeting in mid- February for a renewal of sanctions against Iran.