history _ chile launched a struggle for independence from spain on sept. 18 , 1810 , and finally attained it in 1818 , becoming a republic and establishing a reputation as one of latin america 's most stable democracies .