Chile declared independence from Spain in 1818. The following year, the government decreed that indigenous populations were free and able to paricipate equally, as were other inhabitants of the nation. Differing from other Latin American countries, the Chilean Constitution has consistently regulated nationality. Chile was also among the four nations which did not require a wife to assume her husband's nationality before 1910. The first non-provisional constitution, established in 1822 upon after independence]] from Spain, granted nationality to those born in the country or to those born outside the territory to Chilean parents. The following year the Constitution was replaced. The 1823 constitution primarily established birthright nationals as those born within the country or to nationals of the country, if they resided in the territory, and those born abroad to fathers of Chilean descent or foreign fathers, who were working in the service of the government. It allowed the legislature to grant individual nationality at its discretion, foreigners to naturalize, and identified that persons, who were married to Chileans and engaged in professions, were considered to be Chilean. Other foreigners could naturalize by engaging in a profession for one year, or working in agriculture for five years. Slavery was outlawed and those who engaged in the slave trade were prohibited from obtaining nationality in Chile under the Constitution.