Allah benefited me with a statement I heard from the Messenger of Allah ﷺ during the days of the Battle of the Camel, after I had nearly joined the people of the Camel and fought alongside them. He said, "When news reached the Messenger of Allah ﷺ that the people of Persia had appointed the daughter of Khosrow as their ruler, he said, 'A people who entrust their affairs to a woman will never succeed.'"
لقد نفعني الله بكلمة سمعتها من رسول الله ﷺ أيام الجمل بعد ما كدت أن ألحق بأصحاب الجمل فأقاتل معهم قال: لما بلغ رسول الله ﷺ أن أهل فارس قد ملكوا عليهم بنت كسرى قال: لن يفلح قوم ولوا أمرهم امرأة.
Bukhari narrated it in the Book of Military Campaigns (4425), from Uthman bin Haytham, who said, Awf (that is, Aarabi) narrated to us, from Hasan (that is, Basri), from Abu Bakra, who said, and then he related it.The background of this hadith is that Khosrow, who tore up the letter of the Prophet ﷺ, had Allah set his own son against him, and his son killed him. Then his son killed his brothers, until the matter among them led to a woman being placed in command, and this brought about the loss of their kingdom. So they were torn apart, just as the Prophet ﷺ had prayed against them.