When did Spain become a state?