More than four months before the 2012 presidential election, even as Mitt Romney was rising in the polls, demographer and political analyst Ruy Teixeira accurately predicted the outcome. Obama was likely to win, he said, because of the same powerful demographic forces identified a decade earlier in his book, “The Emerging Democratic Majority.”

To the dismay of such sophisticated and seasoned Republican political veterans as Karl Rove and Frank Luntz, Teixeira was right. In an election pitting demographics against economics, a solid base of African Americans, a burgeoning number of Hispanics, a group of mostly single and highly educated women and a cadre of younger voters -- millennials -- combined to overcome the GOP’s hold on the white working class.

Read the May issue of Governing magazine.

Those same demographics will have a profound effect on government at all levels in the coming years. And in the wake of the election, more state and local officials are showing a keen interest in just how that will play out.

The most profound trend, of course, is the aging of the population, with obvious consequences like soaring health-care costs. But some aspects of the trend are not so predictable. First, it turns out the baby boomers are not as financially prepared for retirement as we may have thought. Thanks to growing levels of obesity, they also are not as physically healthy as we once assumed. And in the past two decades, the number of divorces among people 50 and over has doubled, effectively cutting retirement assets for those affected in half.

Washington will have to contend with soaring entitlement and health-care costs, but the states and localities will have to battle -- in fact, they already are battling -- a crowding out of resources for K-12 and higher education; infrastructure spending, which is now a third of what it was in the 1960s as a share of GDP; workforce training; and other services.

The experience of the so-called “Silent Generation,” people born between 1925 and 1945, may have lulled us into complacency because they are rather well off. Recent Census data revealed that households headed by people 75 and over have a higher median net worth than any younger age bracket.

The first wave of boomers will change that, as will each successive wave. The over 75 population will almost double in the next 25 years, and the number over 85 will more than double by mid-century. They will have lower household net worth, lower relative pre-retirement incomes and a lower share with college educations. As a result, many boomers are being forced to work longer, and the average age of retirement is inching up.

For state and local governments, concerns over the well-being of “young elders” may be more basic than how to provide livable communities close to amenities and public transit; they likely will include how to provide for growing numbers teetering on the edge of poverty.

On the other end of the spectrum, no age group was more deeply affected by the recession than millennials, who saw their unemployment rate pop up to 12 percent, more than a third higher than the national average. Saddled with college loans averaging $27,000 a student, 43 percent of millennials quickly found themselves in jobs that did not require those expensive degrees. The share that moved back in with their parents doubled from the rate 30 years ago.

What’s more, many are putting off marriage and having children. In fact, the nation’s birthrate has fallen to the lowest level since we started tracking it in 1920. They also are slashing consumer debt and deferring purchases of cars or houses, even holding off on obtaining driver’s licenses.

Part of the reason for that is where they want to live, which is often an urban setting -- either in core cities or closer in “urban light” neighborhoods -- that revolves around walkable town centers, in close proximity to hot spots where they can find “shared” transportation like Zipcar and bike-share stations.

As Governing Contributing Editor Alan Ehrenhalt reported in his book, “The Great Inversion,” the half-century mass movement of population out of cities into the ever-expanding periphery is changing. Many central cities and their inner suburbs are expanding again, particularly attracting the more affluent and holding their value far better than those farther out. In 2012, according to Mayor Michael Bloomberg, more people moved into New York City than left for the first time in 60 years, setting a new population record of more than 8.3 million residents. And the Big Apple is not alone.

If there is anything holding back this movement, it is the lack of supply of affordable housing in these sought after areas. So it will behoove city officials who want to attract new residents to streamline their planning and permitting processes so developers don’t have to wait years to break ground.

And no, the farther out suburbs are not going to disappear, but their composition is changing. Newer residents often are immigrants, particularly Asians, who recently outnumbered Hispanics among new arrivals into the country. The largest component is from India; they come well prepared, either seeking a college degree or already holding one. It makes them, according to a Pew Research Center report, the “the most highly educated cohort of immigrants in U.S. history.”

Exurbia will be alive and well. It will just look different.