After the loss of its primary east-west railroad during the war, in 1862 the Confederate government completed the Alabama and Mississippi Rivers Railroad from Selma through Demopolis and to Meridian, Mississippi. The project had been in the works since the 1850s, but several miles between Demopolis and Uniontown had not been finished when war erupted. As the war raged in all directions around Demopolis in 1864, the city was subjected to a huge influx of war refugees. Nathan B. Whitfield noted in his journal that those from Mobile had taken every available vacant house, and others were crowded with local people, along with their descendants and relatives.