It is one of only three spiral minarets in the world and was built of brick and clay during the Abbassid dynasty in the 9th century .