Nashville and others are thriving thanks to a mix of luck, astute political choices and well-timed investments, while cities like Birmingham, Ala., fall behind.

NASHVILLE — Forty years ago, Nashville and Birmingham, Ala., were peers. Two hundred miles apart, the cities anchored metropolitan areas of just under one million people each and had a similar number of jobs paying similar wages.

Not anymore. The population of the Nashville area has roughly doubled, and young people have flocked there, drawn by high-paying jobs as much as its hip “Music City” reputation. Last month, the city won an important consolation prize in the competition for Amazon’s second headquarters: an operations center that will eventually employ 5,000 people at salaries averaging $150,000 a year.

Birmingham, by comparison, has steadily lost population, and while its suburbs have expanded, their growth has lagged the Nashville areas.

....

Ask Ralph Schulz, president of Nashville’s Chamber of Commerce, why this city has done so well and he begins with the Civil War. Nashville surrendered early, allowing it to avoid the destruction that befell many Southern cities. Union troops used the city as a logistics hub, which laid the groundwork for its postwar economy.

Nashville stood apart in other ways, too. The city was less dependent on manufacturing, in part because being Tennessee’s capital brought lucrative — and relatively recession-proof — public investments. Its colleges and universities, anchored by Vanderbilt University, earned it a reputation as the “Athens of the South.”

....

Starting under Mayor Phil Bredesen, who later became Tennessee’s governor, the city invested in big projects that helped revive downtown, a key part of the city’s success.

Economists disagree about what policies are most effective at helping cities grow — or if policies matter much. Some, such as Michael Porter of Harvard and Richard Florida of the University of Toronto, have emphasized the importance of cultivating a “creative class” of artists, designers and entrepreneurs. Others, such as Jan Rivkin of Harvard, stress the importance of civic leadership. Pretty much everyone agrees that having an elite university is a big advantage.

Whatever the exact ingredients, Nashville hit on a winning recipe.

....

The success of the superstars and the substars like Nashville has come at the expense of Birmingham and other smaller cities.

Birmingham’s great boom arrived a century before Nashville’s, when the region’s iron and mineral deposits helped it become one of the nation’s largest steel producers. But as the steel industry declined across the country, Birmingham struggled to find a replacement.

A bet on finance and insurance — the city was at one point a significant regional banking center, home to Regions Financial, SouthTrust and AmSouth Bancorp — proved disastrous in the Great Recession, when the area lost nearly 45,000 jobs. The city still has millions of square feet of vacant office space.