Tapuria (widely known as Tabaristan) was the name of the former historic region in the Southern coasts of Caspian Sea roughly in the location of northern and southern slopes of Elburz range in Iran. The region roughly corresponded to the modern Iranian provinces of Mazandaran, Golestan and northern Semnan.
When the Sassanid empire fell, Yazdegerd III escaped to Tapuria to make use of the Mazanderani's bravery and resistance to repel the Arabs. By his order, AdarVelash (the last Zarmehrian king) ceded the dominion to Ispahbod Gil Jamaspi in 645 CE, while western and Southern Gilan and other parts of Gil's domain merged under the name of Tapuria. He then chose Amol as capital of United Tapuria in 647 CE. The dynasty of Gil was known as Gavbareh in Gilan, and as the Dabuyans in eastern Tapuria.
Tabaristan was one of the last parts of Persia to fall to the Muslim Conquest, maintaining resistance until 765. Even afterwards, Tabaristan remained virtually independent of the Caliphate.
By the time of Shahin's manhood, the Persian Empire had been effectively conquered by the Arabs half a century earlier but Tabaristan remained independent due to its remoteness, rugged terrain and the bravery of its knights.
↑Arabesques: More Tales of the Arabian Nights, Susan Shwartz, ed, pgs. 216-218.