Charlie Baker is trying to become the first Republican to win the Massachusetts governor’s office since Mitt Romney. But Baker is wooing a far different electorate than the one Romney won over in 2002. In the dozen years since Romney took the Corner Office, Massachusetts voters have become significantly less white overall. This demographic shift looms large, since nonwhite voters tend to vote heavily Democratic. Baker has a far smaller margin for error than what Romney, Bill Weld, or Paul Cellucci enjoyed.

US Census data show a dramatic change in the Massachusetts electorate since Romney’s 2002 victory. In 2002, 87 percent of the state’s voting-age citizens were non-Hispanic whites; in 2012, the last year for which data are available, the electorate was only 82 percent white.

The 5 percentage-point decline is significant, since nonwhite voters overwhelmingly fall in the Democratic column. Four years ago, Baker lost Boston’s majority-minority precincts by 74 percentage points, and he regularly lost majority-black precincts by 80 and 90 percentage points. Even if only 2 out of 3 nonwhite voters vote Democratic — a very conservative assumption — a 5-point increase in nonwhite voters would add 3.3 percentage points to the Democratic base.

Romney beat his Democratic opponent, Shannon O’Brien, by less than 5 percentage points; if Romney’s 2002 contest took place today, demographic changes would erase almost all of his margin of victory. Baker’s old boss, Bill Weld, won the 1990 governor’s race by 3 points, among an electorate that was 10 percent whiter than it is today.

The Fall issue of CommonWealth magazine shows why Baker has been spending inordinate amounts of time campaigning in places like Boston, Worcester, Lowell and Springfield. Cities across Massachusetts are much more Democratic-leaning now than they were when Republicans were regularly winning gubernatorial contests. There simply aren’t enough Republican votes in the suburbs for Baker to sustain the kind of urban blowouts he suffered four years ago.

Demographic shifts are largely responsible for creating the kind of urban headwind Baker is now trying to push through. In 2000, white voting-age citizens made up 59 percent of the population in the state’s four largest cities, Boston, Worcester, Springfield and Lowell. In 2010, when Baker lost to Patrick, the electorate in those cities was only 53 percent white, and now, whites constitute less than 51 percent of voters in the four cities.

Voting patterns have swung along with the rise in nonwhite voters. Majority-minority precincts in Boston, Worcester, Springfield and Lowell delivered 50 percent more Democratic votes in 2010 than they did in 2002. Romney lost majority-minority precincts in the four cities by 55 points, while Baker lost them by a margin of 67 points.

Nonwhite Voters are PacingDemocrats' Urban GainsThe past few several cycles have seen Massachusetts Republicans suffer increasingly lopsided defeats in urban areas. Cities that once voted for Republicans have swung to the Democratic column, while margin

Republican struggles with nonwhite voters are a national storyline. Over a decade ago, John Judis and Ruy Teixeira argued in The Emerging Democratic Majority that rising numbers of nonwhite and college-educated liberal voters would combine to push once-safe Republican states like Colorado, Virginia, North Carolina and Nevada into the Democratic column. (They did, written extensively on the steady rise in black voters in Georgia, while New York magazine’s Jonathan Chait has argued that the 2012 presidential election was a last gasp of a national Republican strategy focused almost exclusively on older white voters.

Massachusetts is seeing the same sort of demographic shifts that are putting Republican states in play for Democrats elsewhere. But here, they’re unfolding in an electorate that was already heavily tilted toward Democratic candidates. And in a state where only 11 percent of voters are registered Republicans, demographic churn is turning an already narrow Republican path to statewide victory into a tightrope walk.

This story was cross-posted to Poll Vault, a data-driven look at the 2014 election produced by WBUR, The MassINC Polling Group, and CommonWealth.