The state of Pennsylvania had invested extensively in state-owned canals and short-line railroads. They were neither profitable nor efficient, and the state was falling behind its rivals in infrastructure development, believed critical for economic growth. The Pennsylvania Railroad, PRR, incorporated in 1847, built a line across the Allegheny Mountains from the capital Harrisburg west to Pittsburgh, to eliminate the inefficient Allegheny Portage Railroad and the slow-paced canals. The line would give Philadelphia a link to the fast-growing west, allowing it to compete with Baltimore, Maryland (which was served by the Baltimore & Ohio Railroad) and New York City.