During the Middle Ages, Germany would have built castles to defend their lords and people from Viking attack or Roman invasion. However, this was true for the whole of Europe, yet Germany built far more castles than most of its neighbouring countries.