The monkey was an indigenous god credited with protecting buildings; a tradition that persisted well into the colonial period