Masoud Barzani succeeded his father, the Kurdish nationalist leader Mustafa Barzani, as the leader of KDP in 1979. Working closely with his brother Idris Barzani until Idris's death, Barzani and various other Kurdish groups fought the forces of the Iraqi government in Baghdad during the Iran–Iraq War. For much of this time, the Kurdish leadership was exiled to Iran.