title: History of Madrid
context: The documented history of Madrid dates to the 9th century, even though the area has been inhabited since the Stone Age. The development of Madrid as a city began when Philip II moved his court there from Toledo in the 1560s. Madrid has been the country's capital continuously since 1606.
question: When did Madrid become capital of Spain?
answers: 1606