Presidents also discussed in the meeting.
Mr. Putin arrived in Tehran on Wednesday afternoon to attend the trilateral meeting of presidents of Iran, Russia, and Azerbaijan.
Speaking at the meeting with the visiting Azeri President Ilham Aliyev, Ayatollah Khamenei warned against bids by certain sides to hurt relations between Iran and the Azerbaijan Republic.
Pointing to some of the cooperation between two countries in the fields of culture, economy, investment, energy and transportation and his government's efforts to build mosques, Aliyev said, "we are strengthening our economic and cultural relation with Iran and we are determined these relations be stable and lasting".
Putin was set to meet his Iranian counterpart, Hassan Rowhani, who was expecting a statement of approval from the Russian leader on the 2015 nuclear agreement that obliges Iran to cut back its nuclear programme in exchange for the lifting of global sanctions.
"We have discussed important issues concerning stability, the fight against crime and terrorism, but of course, economic matters topped the agenda", he said.
Putin will also have a meeting with Iran's Supreme Leader Ayatollah Ali Khamenei.
Earlier in the day, Putin sat down for talks with his Iranian counterpart, Hassan Rouhani.
Moscow has stood by Tehran as well while Trump has refused to re-certify the nuclear deal between Iran and world powers including Russian Federation.
The European Union and the other parties to the deal- Russia, Britain, China, France, and Germany - have all urged Trump not to pull the United States out.
The president pointed out that Iran and Russian Federation have contributed to not only fighting terrorism in Syria, but have been successfully involved in a peaceful negotiations process to solve the crisis, having paved the way for political settlement in the war-torn country.