The Venetian propensity for hiding behind masks was legendary: a rigid caste system coupled with ample opportunities for indulging in a host of vices made anonymity very desirable in an overcrowded city where detection was otherwise unavoidable. In the 13th century a law was passed banning masks while gambling. Later norms made it illegal to make masked visits to convents, or to wear masks during many religious festivals.