Solano López and the resulting Paraguayan War ended with the invasion of Paraguay and its defeat by the armies of the three countries. Montevideo, which was used as a supply station by the Brazilian navy, experienced a period of prosperity and relative calm during the war. The first railway line was assembled in Uruguay in 1867 with the opening of a branch consisting of a horse-drawn train. The present-day State Railways Administration of Uruguay maintains 2,900 kms of extendable railway network. The constitutional government of General Lorenzo Batlle y Grau (1868–72) suppressed the Revolution of the Lances by the Blancos. After two years of struggle, a peace agreement was signed in 1872 that gave the Blancos a share in the emoluments and functions of government, through control of four of the departments of Uruguay. This establishment of the policy of co-participation represented the search for a new formula of compromise, based on the coexistence of the party in power and the party in opposition. Despite this agreement, Colorado rule was threatened by the failed Tricolor Revolution in 1875 and the Revolution of the Quebracho in 1886. The Colorado effort to reduce Blancos to only three departments caused a Blanco uprising of 1897, which ended with the creation of 16 departments, of which the Blancos now had control over six. Blancos were given ⅓ of seats in Congress. This division of power lasted until the President Jose Batlle y Ordonez instituted his political reforms which caused the last uprising by Blancos in 1904 that ended with the Battle of Masoller and the death of Blanco leader Aparicio Saravia. Between 1875 and 1890, the military became the center of power. During this authoritarian period, the government took steps toward the organization of the country as a modern state, encouraging its economic and social transformation. Pressure groups (consisting mainly of businessmen, hacendados, and industrialists) were organized and had a strong influence on government. A transition period (1886–90) followed, during which politicians began recovering lost ground and some civilian participation in government occurred. After the Guerra Grande, there was a sharp rise in the number of immigrants, primarily from Italy and Spain. By 1879, the total population of the country was over 438,500. The economy reflected a steep upswing (if demonstrated graphically, above all other related economic determinants), in livestock raising and exports. Montevideo became a major economic center of the region and an