The castle walls were built for defence against invaders.
The country strengthened its defence system against potential threats.