After Madrid became the seat of the royal court, this area grew rapidly in the 16th and 17th centuries.
Madrid became the seat of the royal court  before the 1600s.
Madrid almost became the seat of the royal court but didn't.