Media playback is unsupported on your device Media caption Hundreds of castles have been built in Wales over the centuries

From Anglesey to the shadow of the Severn Bridge, Wales is a nation criss-crossed with castles.

With some estimates suggesting in the medieval period there was one castle for every 12 square miles, it's even been said we are the most castellated land on Earth.

The reasons why may seem obvious.

From the Norman invasion in the late 11th Century up until Owain Glyndwr's uprising against England between 1400 and 1415, the Welsh endured three and a half centuries of sporadic conflict with the English.

Yet Prof Daniel Power, professor of medieval history at Swansea University, believes the answer as to why Wales has so many castles is not so straightforward.

"Plenty of places around the world have experienced as many wars and conquests, but don't have the number of castles you find in Wales," he said.

"The key here is the fragmented nature of the fighting. For 200 years Anglo-Norman marcher lords tussled with a series of warring Welsh principalities, with the Welsh fighting each other as much as the English."

Image copyright Getty Images Image caption Caerphilly is Britain's second biggest castle behind Windsor and is considered to have "the most elaborate water defences"

"Add to that the conflicts between Norman barons such as the 13th Century war waged by the Earl of Gloucester from Caerphilly against his rival Earl of Hereford's land in the lordship of Brecon, and you soon get a much more confused picture than oppressor versus oppressed."

Prof Power added that the geography of Wales also lent itself to castle-building, with easily defendable mountains and valleys, which could be resupplied by river and sea.

"It's no coincidence that many Norman castles are built on the sites of former Welsh fortresses, which themselves were often Roman or Iron Age forts, as they are naturally strategic points from which to control the surrounding land," he said.

"You can see how one is built on the other, such as the Anglo-Norman Cardiff Castle, built within the walls of a Roman fort."

Image copyright Getty Images Image caption Cardiff Castle has evolved from its medieval keep in the grounds

There is no way of telling for sure how many castles have ever been built in Wales.

Best estimates put the number of Anglo-Norman castles alone about the 600 mark, with many hundreds of older structures such as the Roman fort at Caerleon and native Welsh castles such as Dolwyddelan near Ffestiniog.

Probably most famous of all are the castles in Edward I's ring of stone, including Beaumaris, Caernarfon, Conwy, Harlech and Flint, which helped to concentrate his power after his defeat of Llywelyn ap Gruffudd in 1282.

Image copyright Getty Images Image caption The 800-year-old Criccieth Castle is a native Welsh fortress on a headland between two beaches overlooking Tremadog Bay in north Wales

Cadw, the historic monuments agency for Wales, currently manage just over 100 castles in various states of repair, with a small number in private hands.

But what exactly constitutes a castle?

Again the answer is not straightforward.

Whilst we tend to think of stone-built Norman castles, arguably anything from the 1st Century BC Silures hillfort at Llanmelin near Chepstow to the 19th Century "fairytale" Castell Coch near Cardiff could fall into the category of "a castle".

Prof Power argues against applying too strict a definition.

"We tend to think of a castle in a fixed point in time, but they have always been built for many purposes and have invariably evolved over centuries," he added.

Image copyright Getty Images Image caption Castell Coch- Welsh for red castle - is a 19th-century Gothic Revival fortress a few miles north of Cardiff

"All castles are about exerting control, but you see a difference between castles like Caerphilly, designed as a seat of baronial power and commerce, and the royal castles of the north, built to secure the military supremacy of the English Crown.

"Raglan - the last of the castles proper - was intended to be a fortified residence when it was built in the mid-15th Century, but later saw military action in the English Civil War."

Covering 30 acres, Caerphilly is Wales' biggest castle, with the single tower of Cwm Camlais near Brecon, (largely destroyed in 1265 and never repaired), having a claim as the smallest.

Taking only the mediaeval castles, Chepstow, begun just six months after the Norman invasion is the oldest, with Raglan - the only significant one built post-Glyndwr - the newest.

But what does Prof Power think are the most unusual?

Image copyright Getty Images Image caption Unesco considers the World Heritage site of Beaumaris Castle to be one of 'Europe's finest examples of late 13th Century and early 14th Century military architecture'

Image copyright Hulton Archive Image caption The entrance to Beaumaris Castle, from the mid-18th Century

"Beaumaris is interesting, partly because it was never completely finished, and partly because it isn't moulded to the landscape like most others, it's almost an exercise in perfect geometric castle-building.

"Carreg Cennen in Carmarthenshire is fascinating, as it incorporates a natural underground cavern, but nobody knows exactly what purpose it served."

Why were some castles blown up?

The great period of castle warfare lasted from the medieval period to the 17th Century - the English civil war in the 1640s was effectively the last conflict where castles played a significant role.

Image copyright Getty Images Image caption Chepstow Castle perched above the River Wye on the Wales-England border boasts the oldest castle doors in Europe

Their stone walls and battlements, which had held out against medieval weapons were all too vulnerable to attack from cannons and gunpowder and there were sieges at castles including Harlech, Raglan and Laugharne, when they were taken by Parliamentary forces.

"Upon their surrender, orders were usually issued for castles to be damaged beyond further use," said Kate Roberts, head of historic environment at Cadw.

"General practice was to fill the towers with barrels of gunpowder and light the fuse.

Image copyright Getty Images Image caption The remains of Dinas Bran medieval castle is on a hilltop above Llangollen in Denbighshire

"Towers were blown apart - making the castles indefensible. No longer in use, castles fell into disrepair and many parts collapsed."

When did they become visitor attractions?

Towards the end of the 19th Century interest began to rise again in castles as curiosities and in many cases - visitor attractions.

At Caernarfon the constable of the castle - Sir Llywelyn Turner - used the 4p entrance fees charged to visitors to pay for some repairs to make the castle safe enough to visit. At Caerphilly Castle, the 4th Marquis of Bute undertook a major reconstruction project in the 1930s - rebuilding the inner gatehouse.

Image copyright National Museum Galleries of Wales/Getty Images Image caption William Daniell's painting of Conwy Castle from 1789

Image copyright Getty Images Image caption Caernarfon Castle is recognised around the world as one of the greatest buildings of the Middle Ages

"During the course of the 20th Century many castles in Wales came into the care of the state - considerable conservation was carried out - much of it by men from the Ministry of Works," added Ms Roberts.

" We owe a great debt of gratitude to their work, without which many of our most famous castles may have been lost."

This story was inspired by a question sent to us anonymously asking: "Why does Wales have so many castles? The most in Europe?"

What questions do you have about Wales, or its people and places?

Is there anything you've always wanted to know?

Use this form to send us your questions:

If you are reading this page on the BBC News app, you will need to visit the mobile version of the BBC website to submit your question on this topic.

We may get in touch if we decide to follow up on your suggestion.