Analysis: The visit came amid the backdrop of mounting regional tensions and several months after Pakistan and Iran launched strikes on each other's territory.