The Confederacy was beset by growing problems as its territory steadily shrank, its people grew impoverished, and hopes of victory changed from reliance on Confederate military prowess to dreams of foreign intervention, to finally a desperate hope that the Yankees would grow so weary of war they would sue for peace. The South lost its lucrative export market as the Union blockade shut down all commercial traffic, with only very expensive blockade runners getting in and out. In 1861 the South lost most of its border regions, with Maryland, Kentucky and Missouri gained for the enemy, and western Virginia broken off. The Southern transportation system depended on a river system that the Union gunboats soon dominated, as control of the Mississippi, Missouri, Cumberland, and Tennessee rivers fell to the Union in 1862–63. That meant all the river towns fell to the Union as well, and so did New Orleans in 1862. The rickety railroad system was not designed for long-distance traffic (it was meant to haul cotton to the nearest port), and it steadily deteriorated until by the end practically no trains were running. Civilian morale and recruiting held up reasonably well, as did the morale of the army, until the last year or so. The Confederacy had democratic elections (for all white men), but no political parties. One result was that governors became centers of opposition to Jefferson Davis and his increasingly unpopular central administration in Richmond. Financially the South was in bad shape as it lost its export market, and internal markets failed one after the other. By 1864 women in the national capital were rioting because of soaring food prices they could not afford. With so few imports available, it was necessary to make do, use ersatz (such as local beans for coffee), use up, and do without. The large slave population never rose up in armed revolt, but black men typically took the first opportunity to escape to Union lines, where over 150,000 enrolled in the Union army. When the end came the South had a shattered economy, 300,000 dead, hundreds of thousands wounded, and millions impoverished, but three million former slaves were now free.