Montgomery is the capital of the U.S. state of Alabama, and is the county seat of Montgomery County. It is located on the Alabama River southeast of the center of the state, in the Gulf Coastal Plain. As of the 2010 census, Montgomery had a population of 205,764 making it the second-largest city in Alabama, after Birmingham, and the 103rd largest in the United States. Montgomery is the primary city of the Montgomery Metropolitan Statistical Area, which had a 2010 estimated population of 374,536. It is the fourth-largest in the state and 136th among United States metropolitan areas. The city was incorporated in 1819, as a merger of two towns situated along the Alabama River. It became the state capital in 1846, representing the shift of power to the south-central area with the growth of cotton as a commodity crop of the Black Belt and Mobile's rise as a mercantile port.