<human>:  I have a question about a book I’m reading called The History of Madrid. When did the city of Madrid become the capital of Spain?
<bot>: Madrid became the capital of Spain in 1561. The city was chosen as the capital because it was the largest and most important city in Spain. The city was also chosen because it was located in the center of the country, which made it easier to defend.