Iranian Foreign Minister Mohammad Javad Zarif has rebuffed warnings from the White House concerning Tehran's ballistic missile program.

Iran "was playing with fire" by testing medium-range ballistic missiles over the weekend, President Donald Trump said Friday. U.S. officials argued the test violated the 2015 multilateral nuclear treaty negotiated between the U.S., Iran and several other nations. Iran, which has maintained its nuclear program was only for energy development purposes, said the missiles tested were not designed to carry nuclear warheads and were for defensive purposes only, therefore not violating the 2015 treaty. Zarif, who was a central figure in the 2015 treaty talks, tweeted his response to Trump's statements.

"Iran unmoved by threats as we derive security from our people. Will never initiate war, but we can only rely on our own means of defense," Zarif wrote. "We will never use our weapons against anyone, except in self-defense. Let us see if any of those who complain can make the same statement."

Trump has said he will take a tougher stance on Iran than his predecessor, President Barack Obama. Conservatives widely criticized Obama's treaty with Iran and accused the former president of conceding to Tehran. As part of the deal, Iran would limit its nuclear program and the U.S. would lift hefty sanctions, freeing billions of dollars' worth of frozen Iranian assets. Washington has long accused Iran of supporting terror around the world via allied militias and political movements.

Iran had previously called the U.S.' threat to reenact sanctions "useless." It also criticized Trump's executive order than banned travel to the U.S. from Iran and six other countries. The other countries listed in the immigration ban are Iraq, Libya, Somalia, Sudan, Syria and Yemen. 

Iranian President Hassan Rouhani called Trump out Saturday over his anti-immigration policies via social media.

"Let's help neighbouring cultures, not build walls between nations," Rouhani tweeted.