Like most of the Latin American countries, Nicaragua bases its economy largely within the agricultural sector. Throughout history, the agricultural sector of Nicaragua has followed a tortuous path, which explains in part the pattern of a slow development process and the final relationship between GDP growth and the export activity. Long before Nicaragua's independence, maize, tobacco, sugar, and cacao represented the most important crops, in the production of which almost the entire rural population was engaged. The period between the independence from Spain in 1821 and 1857 was characterized by a political transition, in which Nicaragua left the Central American Federation and went into the struggle between the two existing political parties, Liberals and Conservatives, to define the new government. The economic problems here were of second order and no attention was paid to agriculture or any other economic activity. From the 1850's until 1893, Nicaragua was under a period of conservative rule, delaying the process of economic progress which was at work in neighboring countries.