Updated

Iran's newly re-elected president Hassan Rouhani said on Monday that his country will continue its ballistic missile program despite criticism from U.S. President Donald Trump.

"The U.S. leaders should know that whenever we need a missile test because of a technical aspect, we will test," Rouhani said in a news conference. "We will not wait for them and their permission."

"Our missiles are for peace, not for attack," he added.

The remarks came three days after he won Iran's presidential election, securing another four-year term. On Sunday, Trump also made a speech in Riyadh, Saudi Arabia that urged leaders in the Middle East region to combat extremism.

“Our goal is a coalition of nations who share the aim of stamping out extremism and providing our children a hopeful future that does honor to God,” Trump said.

The president, to a crowd that included leaders of more than 50 Muslim-majority countries, said his goal isn't to "lecture" people how to live, but to offer "partnership."

"Instead, we are here to offer partnership — based on shared interests and values — to pursue a better future for us all," Trump said.

On Monday, Trump touched down in Israel for the second part of his foreign trip, the first one since taking office. He met with Israeli President Reuven Rivlin in Jerusalem and said in a statement after the meeting that Israel and Muslim nations have a growing realization that they share a "common cause" of combating "the threat posed by Iran."

Trump also criticized Iran earlier in the trip for spreading "destruction and chaos" throughout the region. His comments were echoed by Saudi King Salman, who declared: "The Iranian regime has been the spearhead of global terrorism."

Rouhani countered the comments by saying the United States does not understand the region.

"Those who provide consultations or advice to the Americans, unfortunately, they are the rulers who either push America awry or with money, they just buy some people in America," Rouhani said in response to a question by The Associated Press.

Iran's president added that Iranians are waiting for Trump and his administration to "be civil" and "settle down" so the nations could better understand each other.

Rouhani also slammed Saudi Arabia, saying that the kingdom "has never seen a ballot box" while Iran just hosted a successful presidential election in which over 40 million people voted. He also called the Saudi summit a "show-off" convention that "will not have any political and practical values."

The Associated Press contributed to this report.