Qazi Muhammad acted as the President of the Republic of Mahabad, in (Eastern Kurdistan) in 1946.
He was also the founder of the Kurdish Democratic Party of Iran, that was established after the need for a more transparent party was felt by its adherents. (Komeley Jiyanewey Kurd existed prior to that, as a secret organization.)
Mustafa Barzani, one of the "leaders" of the nationalist Kurdish movement in Iraqi Kurdistan, was also the commander of its army.
His cousin Mohammed Hossein Saif Qazi was a minister in his cabinet.
A year later, after the Soviets withdrew from Iran, the Kurdish Republic was crushed by Iran's central government.
An Iranian military court sentenced Qazi and two of his associates to death by hanging in Chwarchira Square, in the center of the city of Mahabad, on 31 March 1947.
They were left hanging for more than two days.