Madrid has a history going back to before the Moorish Empire controlled Spain, although it really only rose to prominence after 1561, when the location in the centre of the country attracted then King Felipe II to appoint it as the seat of the royal family and the capital of the country.
From then, and with the enormous wealth of Spain, Madrid grew into a beautiful city of monuments and palaces, and this drew in immigrants from all over the country with the promise of wealth. Now, Madrid is a thriving centre, not only of the arts, but also of the culture of the whole of Spain.