Pressure from hardliners over Iran’s nuclear deal with world powers forced Foreign Minister Mohammad Javad Zarif to resign, an ally said on Tuesday.