"Khuda Hafez Tehran! A busy day of diplomacy ends as PM @narendramodi emplanes for Delhi," Ministry of External Affairs spokesperson Vikas Swarup tweeted.
Modi who held extensive talks with President Hassan Rouhani also called on Iranian Supreme Leader Ali Khamenei before heading home.
During the visit, besides the bilateral pact to develop the Chabahar port for which India will invest USD 500 million, a trilateral Agreement on Transport and Transit Corridor was also signed by India, Afghanistan and Iran, which Prime Minister Modi said could "alter the course of the history of the region".
The agreements, aimed at further deepening India-Iran ties in diverse fields, covered areas of economy, trade, transportation, port development, culture, science and academic cooperation.
Modi's visit, the first by an Indian Prime Minister in 15 years, came months after the lifting of international sanctions on Iran following Tehran's historic nuclear deal with the Western powers over its contentious atomic programme. Earlier, the then Prime Minister Atal Bihari Vajpayee had visited the country in April 2001.