By 1850, 9,000 miles (14,000 km) of railroad lines had been built. The federal government operated a land grant system between 1855 and 1871, through which new railway companies in the west were given millions of acres they could sell or pledge to bondholders.