Ansari delivered the message during a meeting with Chilean Foreign Minister Roberto Ampuero in Chile’s capital of Santiago.
In recent weeks, President Rouhani’s special envoys have travelled to different countries in Latin America and conveyed his messages to his opposite numbers and other heads of state.
Ansari, as well as Deputy Foreign Minister Morteza Sarmadi, have earlier carried out the same mission in Brazil, Bolivia, and Venezuela.
The Iranian administration has enhanced political contacts with foreign leaders in recent weeks on the ways to save the 2015 Iran nuclear deal after the US exit.
Last week, President Rouhani told his French counterpart that staying in the JCPOA will be out of the question if Tehran cannot enjoy the benefits of the nuclear deal.
On May 8, the US president pulled his country out of the JCPOA, which was achieved in Vienna in 2015 after years of negotiations among Iran and the Group 5+1 (Russia, China, the US, Britain, France and Germany).
Following the US exit, Iran and the remaining parties launched talks to save the accord.