The attackers were Iranian citizens.
He underlined that the enemies have learned from the Imposed War that Iranian nation stands with courage and determination to defend its independence and territorial integrity and to regret every aggressor and threatening body. It's also created to signal to the USA that Iran is fighting the Islamic State on its own terms, he added.
The attack came in the wake of a twin attack carried out by IS on Iran's Parliament and the Mausoleum of Ayatollah Ruhollah Khomeini in the capital Tehran on June 7, killing 17 and injuring dozens others.
The operation comes just days after the U.S. Senate passed the Countering Iran's Destabilizing Activities Act by an overwhelming margin, a new sanctions legislation which targets Iran's ballistic missile program and applies sanctions against the IRGC.
The Zolfaghar missile, unveiled in September 2016, was described at the time as carrying a cluster warhead and being able to strike as far as 700 kilometers (435 miles) away.
Sharif also warned that missile attacks launched into eastern Syria the previous day would be repeated if the extremists take action against Iran's security. While Iran has other ballistic missiles it says can reach longer distances, Sunday's strike appears to be the furthest carried out overseas.
Iran had earlier implicitly suggested that the US and Saudi Arabia, its chief regional foe, had insinuated the terrorist attacks in Tehran. However, it stopped short of directly blaming the kingdom for the attack, though many in the country have expressed suspicion that Iran's regional rival had a hand in the assault. It has test-fired a number of missiles since Iran struck the 2015 nuclear deal with world powers, including the U.S. Israel also remains concerned about Iran's missile launches.
He spoke as part of a TV package about the missile launches, showing them shoot off into the night from the western province of Kermanshah. "And we are also following their words", Israeli Prime Minister Benjamin Netanyahu said.
Iranian officials meanwhile offered a series of threats of more strikes, including former Guard chief Gen. Mohsen Rezai.
Associated Press writer Jon Gambrell in Dubai, United Arab Emirates, contributed to this report.