A couple of decades ago, Prince William County was one of the mostly white, somewhat rural, far-flung suburbs where Republican candidates went to accumulate the votes to win elections in Virginia.

Since then, Prince William has been transformed. Open tracts have given way to town houses and gated developments, as the county — about a half-hour south of Washington — has risen to have the seventh-highest household income in the country and has become the first county in Virginia where minorities make up more than half the population.

If Prince William looks like the future of the country, Democrats have so far developed a much more successful strategy of appealing to that future. On Tuesday, President Obama beat Mitt Romney by almost 15 percentage points in Prince William, nearly doubling George W. Bush’s margin over Al Gore in 2000, helping Mr. Obama to a surprisingly large victory in Virginia.

He did it not only by winning Hispanic voters, but also by winning strong majorities of the growing number of Asian-American voters and of voters under age 40. A version of his coalition in Virginia — a combination of minorities, women and younger adults — also helped Mr. Obama win Colorado, Nevada and perhaps Florida, which remained too close to call. He came close in North Carolina, a reliable state for Republican presidential nominees only a few years ago that he narrowly won in 2008.