Focusing on the military institutions (army, militia, and National Guard) of Bahia, Brazil, this book analyzes the regions transition from Portuguese colony to province of the Brazilian Empire. It examines the social, racial, and cultural dimensions of post-independence state-building in one of the principal slave plantation regions of the Americas. Contrary to those who stress the autonomy of the Brazilian state, this book documents the close connections between the locally-organized armed forces and society in the late colonial period. Racially segregated and mirroring the class hierarchies of the larger society, these military institutions were profoundly transformed by the war for independence in the early 1820s. In its aftermath, the new Brazilian state gradually built a national army, breaking the local orientation of the Bahian regulars by the 1840s. The National Guard, locally-oriented and democratic in its 1831 organization, was turned into a state-controlled corporation in the 1840s. These developments deeply affected the lives of the men (and women) involved in the armed forces, and a main aim of this book is to examine their participation in the complex and convoluted process of state-building. The liberalism used to justify independence and the creation of an imperial state resonated among ordinary soldiers and officers, as it provided an ideology and language with which to challenge important features of late colonial military organization such as racial segregation and corporal punishment. Racial discrimination, formally eliminated in the 1830s, shaped racial politics in the military, while the construction of a national army undermined the previously close connections of officers and soldiers to the mainstream of Bahian society.