US President Donald Trump's national security adviser has signalled a toughening US stance on Iran, condemning a recent missile test and declaring Washington was "officially putting Iran on notice".

In his first public remarks since taking office, National Security Adviser Michael Flynn accused former president Barack Obama's administration on Wednesday of having "failed to respond adequately to Tehran's malign actions".

Citing a recent missile test and the actions of Iranian-backed rebels in Yemen, Flynn said on Wednesday that "Iran is now feeling emboldened".

READ MORE: Report warns Trump against scrapping Iran nuclear deal

"As of today, we are officially putting Iran on notice," he said without elaborating.

Both Trump and Flynn have been vocal opponents of an international deal that saw Iran curb its nuclear programme in return for sanctions relief.

Earlier on Wednesday, Iran confirmed that it carried out a new missile test, but insisted that it did not breach Tehran's nuclear accord with world powers or a UN Security Council resolution endorsing the agreement.

Hossein Dehghan, Iran's defence minister, on Wednesday defended Sunday's test after the US called an urgent UN Security meeting to discuss the issue.

"The recent test was in line with our plans and we will not allow foreigners to interfere in our defence affairs," Dehghan said, according to the Tasnim news agency.

"The test did not violate the nuclear deal or the [UN] resolution 2231," he said.

On Tuesday, Javad Zarif, foreign minister, affirmed that Iran's missile tests do not involve rockets with nuclear warheads and are not part of the historic deal signed two years ago by world powers, but stopped short of confirming the test.

In an interview with Al Jazeera, Trita Parsi, of the National Iranian American Council, said that even though the Iranians are not violating both the deal and the UN resolution, doing the test was "clearly provocative".

"It was meant to test the new Trump administration," he said. "I don't think that is particularly a good idea. Because this is an administration that seems to be ideologically opposed to the very concept of de-escalation."

But Parsi also said that the White House statement is "very dangerous".

"What started off as bluster may very quickly turn into a real war."

'Deterrence against hostile enemies'

A White House official, speaking on condition of anonymity, had said a ballistic missile test was carried out on Sunday from a site near Semnan, east of Tehran, according to the Reuters news agency.

The medium-range ballistic missile reportedly exploded after 1,010km, the official said, adding that the last time this type of device was test-launched was in July 2016.

The new US ambassador to the United Nations, Nikki Haley, called the test "unacceptable", after Tuesday's emergency session.

The test drew wide condemnation as many feared it could be in violation of the UN resolution which was part of the 2015 nuclear deal between Iran and the US, UK, France, China, Russia and Germany.

Meanwhile, some 220 Iranian members of parliament reaffirmed support for Tehran's missile programme, 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," MPs 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 organisation for development of our conventional defensive capability".

During the US election campaign, President Donald Trump branded the nuclear agreement "the worst deal ever negotiated", telling voters that he would either rip it up or seek a better deal.