Even before the United States acquired California after the Mexican War (1846-48), many heading for California used the isthmus crossing in preference to the long and dangerous wagon route across the vast plains and rugged mountain ranges. Discovery of gold in 1848 increased traffic greatly. In 1847 a group of New York financiers organized the Panama Railroad Company. This company secured an exclusive concession from Colombia allowing construction of a crossing, which might be by road, rail, river, or a combination. After surveys, a railroad was chosen and a new contract so specifying was obtained in 1850. The railroad track followed generally the line of the present canal. The first through train from the Atlantic to the Pacific side ran on the completed track on January 28,1855.
The gold rush traffic, even before the completion of the railroad, restored Panama’s prosperity. Between 1848 and 1869, about 375,000 persons crossed the isthmus from the Atlantic to the Pacific and 225,000 crossed in the opposite direction. Prices for food and services were greatly inflated, producing enormous profits from meals and lodging.
The railroad also created a new city and port at the Atlantic terminus of the line. The town that immediately sprang up to accommodate the railroad offices, warehouses, docks and shops and to lodge both railroad workers and passengers soon became and remains, the second largest in the country. United States citizens named it Aspinwall, after one of the founders of the Panama Railroad Company, but the Panamanians christened it Col