The walled city was protection from direct assault , but once a townsperson left the city walls , he or she was at the mercy of often violent and lawless nobles in the countryside . The walled city represented protection from direct assault at the price of corporate interference on the pettiest levels , but once a townsman left the city walls , he ( for women scarcely traveled ) was at the mercy of often violent and lawless nobles in the countryside .