Safavid dynasty
The fall of the Safavid dynasty in 1722 caused widespread chaos. Baku was invaded by the Russian and Ottoman empires.