According to legend, the Carnival of Venice started following the military victory of the Venetian Republic over the Patriarch of Aquileia, Ulrico di Treven in the year 1162. In the honour of this victory, the people started to dance and gather in San Marco Square. Apparently, this festival started in that period and became official in the Renaissance. In the seventeenth century, the baroque carnival was a way to save the prestigious image of Venice in the world. It was very famous during the eighteenth century. It encouraged licence and pleasure, but it was also used to protect Venetians from present and future anguish. However, under the rule of the Holy Roman Emperor and later Emperor of Austria, Francis II, the festival was outlawed entirely in 1797 and the use of masks became strictly forbidden. It reappeared gradually in the nineteenth century, but only for short periods and above all for private feasts, where it became an occasion for artistic creations.