Iran's President left Islamabad and is heading back to Tehran.