Why were Muslims able to conquer large portions of Sasanian and Roman Empires, and then build a powerful and prosperous empire in their place?

“Why were Muslims able to conquer large portions of Sasanian and Roman Empires, and then build a powerful and prosperous empire in their place?”