Politics of the Empire of Brazil took place in a framework of a quasi-federal parliamentary representative democratic monarchy, whereby the Emperor of Brazil was the head of state and nominally head of government although the Prime Minister, called President of the Council of Ministers, was effectively the de facto head of government, and of a multi-party system. Executive power was exercised by the government. Legislative power was vested in both the government and the two chambers of the General Assembly (or Parliament). The Judiciary was independent of the Executive and the Legislative. There was also a fourth power, the Moderating power, exercised by the emperor. The Empire of Brazil was divided into 20 provinces and the Neutral Municipality, capital of the country. State structure Monarchy Upon gaining independence from Portugal in 1822, the Brazilian nation as a whole was almost entirely in favor of a monarchical form of government. There were a variety of reasons for this political choice. There was fear among various social groups of the possibility that Brazil would fall into the same political, social, and economic chaos experienced by most of the former Spanish American colonies: territorial dismemberment, coups, dictatorships and the rise of caudillos. The perceived necessity was for a political structure that would allow the Brazilian people not merely to enjoy the advantages of liberty, but also that would guarantee the country's stability, in conformance with the liberalism of the time. Only a neutral entity, completely independent of parties, groups or opposing ideologies, could achieve this end. And there was "always a powerful ideological element remaining from independence as the result of a great national union over particular interests." The Brazilian monarchy was "a form of government that assured a Brazil that would include the whole of the old Portuguese dominion, in a climate of order, peace, and freedom." There was also another reason for adoption of the monarchy, or more precisely, its maintenance. The Europeans, as much as the Africans and the Native Americans, came from monarchical societies. To remain under this form of government was a way of maintaining the traditions and identity of the Brazilian people, a people descended from those three distinct ethnic groups. The choice of a member of the House of Braganza came not just from the historical moment, but also from the fact that Prince Pedro descended from the pure male line of the Portuguese kings. The