For more than half a century, the Assad dynasty appeared to have an impregnable hold over Syria. Relying on a formidable security apparatus, brutal use of force, and powerful allies such as Russia, Iran, and Hezbollah, it had withstood multiple uprisings, and even a terrible civil war in which hundreds of thousands were killed and for a time the regime lost control of much of the country.