Answer
When Pedro II took over as Emperor in 1840, the empire was on the verge of disintegration. Brazil was in a state of political chaos and economic instability. The country had just gone through a civil war and was struggling to rebuild. The economy was in shambles and the government was in debt. Pedro II faced a daunting task of trying to unite the country and restore order.