From the 4th century BCE, the settlement began to expand beyond the hill fortress, which became a citadel to an expanding city. In the 1st century BCE, Derbent became incorporated in the kingdom of Caucasian Albania, probably as its northernmost possession. Derbent experienced a period of considerable prosperity in the first three centuries of the Common Era, but the resumption of nomad raids in the 4th century (the Alans and later the Huns) meant that it quickly reverted to its role as a frontier post and a "symbolic boundary between nomadic and agrarian ways of life".[1] In the late 4th century CE, Albania passed under Sasanian influence and control; in the 5th century, it was a Sasanian border fortress and the seat of a march-warden (marzban).[1]