Until May 26, 1848, when Mexico and the United States ratified the Treaty of Guadalupe Hidalgo, Alta California was officially militarily-occupied enemy territory. Until a civilian authority was established the military decided to retain the Mexican administrative and judicial system of "prefects" for districts and "alcaldes" for municipalities. This continued even after California became part of the United States because Congress never did organize California as a U. S. territory. California remained a military district so the old Mexican laws, supplemented by pronouncements of the military governors, largely remained in place. California finally did achieve statehood on September 9, 1850, as part of the slavery-focused Compromise of 1850.