human
When did the city of Madrid become the capital of Spain?
assistant
The city of Madrid has been the capital of Spain since the 15th century. It was first called the Royal City of Madrid, and then later became the Royal City of the Kingdom of Spain.