Why was the Ottoman Empire better able to fend off European colonialist incursions than the Safavid Empire and its various successor states?

by Vambrosek
CptBuck

I'm a bit confused by this question. While the various Persian dynasties lost some some territory to Russia, Afghanistan, or the Ottomans themselves I'm unaware of the Safavid empire being any more susceptible to European incursions than the Ottomans were.

By the end of the 19th century the Ottomans had lost nearly all of their European territory, virtually all of their North African states were under European control, and several foreign powers were directly involved in and interfering with Ottoman internal policy, ostensibly to secure rights for Christians in the Levant.

I'm less familiar with the colonial era history of Persia, beyond British hegemony in the Persian Gulf. Persia has nonetheless been an independent power for centuries and the territory of the Safavids doesn't look terribly different from that of Iran today.

diseased_oranguntan

Why was the empire that was dismantled piecemeal and turned into European colonies better able to fend off European colonists than a country that remained independent if losing a little territory over that period? What?