He also expressed sympathy with the families of the victims.
The Iranian President stressed that Tehran believes such inhumane and criminal actions will bring nothing but disgrace for the perpetrators.
Earlier, Iranian Foreign Minister, Hossein Amirabdollahian, also denounced the deadly terrorist attack.
The top diplomat said the effective fight against terrorism and extremism is a common security concern between Iran and Pakistan.
On Sunday, at least 44 people were killed and dozens more injured in a bomb blast in a political rally in northwestern Pakistan bordering Afghanistan.