In a message on Monday, President Rouhani expressed hope that Tehran and New Delhi would enhance all-out relations.
“Undoubtedly, your election, which was marked by mass participation of people from all walks of life, indicates the full confidence of the Indian nation in your developmental and prudent policies,” the Iranian president added.
Rouhani also wished more success for Modi and prosperity for the Indian people.
Earlier this month, the Iranian Foreign Ministry congratulated the Indian nation and government on successful parliamentary elections in the country.
"The Islamic republic of Iran congratulates the holding of this vibrant election to the (Indian) people, government, political parties and leaders, specially the BJP," Iranian Foreign Ministry Spokeswoman Marziyeh Afkham said.
Leader of India's BJP Party, Modi, claimed victory on May 16 as the right-wing Hindu nationalist party headed for the country's biggest election victory in the last 30 years.
With the ruling Congress Party conceding defeat, Modi took charge of the world’s largest democracy as the BJP returns to its leadership role after 10 years.
The Congress managed to get just 44 seats on its own and 58 with its allies as the BJP swept to power by crossing halfway mark in the 543-member Lower House of Parliament on its own.