Derbent remained a pivotal Iranian town until it was ceded in 1813 per the Gulistan treaty.
In the 1886 population counting of the Dagestan Oblast, of the 15,265 inhabitants Derbent had, 8,994 (58,9%) were of Iranian descent () thus comprising an absolute majority in the town [REF].