 It had been the motor of the colonial economy, but there was considerable fighting during the war of independence in Zacatecas and Guanajuato, the two most important silver mining sites.In spite of Viceroy O'Donojú's having signed the Treaty of Córdoba giving Mexico its independence, the Spanish government did not recognize it as legitimate and claimed sovereignty over Mexico.Spain set in motion events that brought Iturbide, the son of a provincial merchant, as Emperor of Mexico.With Spain's rejection of the treaty and with no European royal taking up the offer of being Mexico's monarch, many creoles now decided that having a Mexican as its monarch was acceptable.