As feudalism in China had been largely superseded by centralised nation states since the Qin Dynasty from 221 BC, most Chinese castles were not intended as residences of the nobility, but are more properly described as either fortresses or fortified vernacular and religious structures.