Birmingham is the most populous city in the U.S. state of Alabama and the county seat of Jefferson County. The city's population was 212,237 in the 2010 United States Census. In the 2010 US Census, the Birmingham-Hoover Metropolitan Statistical Area had a population of about 1,128,047, which is approximately one-quarter of Alabama's population. 

Birmingham was founded in 1871, during the post-Civil War Reconstruction period, through the merger of three pre-existing farm towns, notably, former Elyton. It was named for Birmingham, England, the UK's second largest city and then major industrial city. The Alabama city annexed smaller neighbors and developed as an industrial and railroad transportation center, based on mining, the new iron and steel industry, and railroading. Most of the original settlers who founded Birmingham were of English ancestry. The city was developed as a place where cheap, non-unionized, and African-American labor from rural Alabama could be employed in the city's steel mills and blast furnaces, giving it a competitive advantage over unionized industrial cities in the Midwest and Northeast. 

From its founding through the end of the 1960s, Birmingham was a primary industrial center of the southern United States. Its growth from 1881 through 1920 earned its nicknames as "The Magic City" and "The Pittsburgh of the South". Its major industries were iron and steel production, plus a major component of the railroading industry. Rails and railroad cars were both manufactured in Birmingham. Since the 1860s, the two primary hubs of railroading in the Deep South have been nearby Atlanta and Birmingham. The economy diversified in the latter half of the 20th century. Banking, telecommunications, transportation, electrical power transmission, medical care, college education, and insurance have become major economic activities. Birmingham ranks as one of the largest banking centers in the United States and as one of the most important business centers in the Southeast.
What was the basis of its economy then?
developed as an industrial and railroad transportation center, based on mining, the new iron and steel industry, and railroading.