madrid was ruled by the romans from the 2nd century. after ad 711 it was occupied by the moors. in 1083 spain was ruled again by spaniards. catholic kings ruled the country. by the mid-16th century it had become the capital of a very large empire. spain was ruled by monarchs from the house of habsburg, then the house of bourbon. after the spanish civil war it was ruled by a dictator until the mid-1970s when it became a democracy.