Castile and León Flag: Meaning and History

History of the flag
The current flag of Castile and León (an autonomous community of Spain) was adopted in 1983.
It combines the emblems of Castile and León, two provinces that were fundamental to the formation of the Kingdom of Spain.
What do the elements of the flag mean?

The golden castle of Castile on a red background is a typical symbol of the Spanish crown.

The legend says that King Pelayo who had a lion painted on his shield in gratitude after killing one following the Battle of Guadalete in the 8th century.
