(CNN) The fast-growing metropolitan areas of Texas are moving to the front line of the battle between the two major political parties for control of the nation's direction.

Texas has been a linchpin of the Republican Party's national strength for a generation. But in 2018, Democrats recorded their most significant gains in decades in the state's largest urban centers.

Now Texas Republicans face indications that the same recoil from President Donald Trump that has hurt the party in other diverse and well-educated metropolitan areas -- from suburban Philadelphia to Orange County, California -- could combine with growing racial diversity to move Texas from reliably red into a genuinely competitive state much more quickly than almost any analyst envisioned even a few years ago.

"Trump has sped everything up by four to six years," says Richard Murray, a University of Houston political scientist. For the Republicans, he said, "it's a deadly combination of rapid demographic change and the immediate political dynamics."

Texas remains a difficult, though not unreachable, target for Democrats in the 2020 presidential race -- in part because it's unclear whether any potential Democratic nominee other than Beto O'Rourke, who represented a House district in El Paso, would invest the massive sums required to truly compete in the state.

But the party's improving position in Texas' thriving metropolitan areas is creating the opportunity for it to seriously contest as many as five or six more seats in the US House, possibly recapture enough seats to regain a majority in the state House of Representatives and mount highly competitive races both against Trump and Republican Sen. John Cornyn , who is seeking reelection next year.

Republicans keenly recognize the risk they will face if the Democrats can consolidate or even expand their recent beachheads in the state's metropolitan areas, particularly because those areas are projected to cast an ever-increasing share of the state's vote.

"We had made the mistake for years of allowing Democrats to build up a set of strongholds in the major metro areas that they were then able to work from," says James Dickey, the Texas Republican Party chairman. "So it's incumbent on us to recover those gains and attack them right in the base of those strongholds."

The battle for the allegiance of metropolitan Texas is likely to be one of the pivot points in American politics over the next decade. Republicans have carried Texas in every presidential race since 1976, and with the help of favorable district lines drawn by the GOP-controlled state Legislature, have been able to count on big margins from its state congressional delegation -- where Republicans now hold 23 of the 36 seats -- as well as its two Senate seats.

It would fundamentally reshape the competition between the parties if Democrats can loosen the Republican grip on any of those prizes in Texas, especially its 38 Electoral College votes. And if Republicans can no longer count reliably on Texas -- or other Sun Belt states, including Arizona and Georgia, also being transformed by the same twin forces of urbanization and diversification -- it would represent a huge price for the Trump strategy of maximizing support among rural and working-class white voters that has strengthened the GOP in Rust Belt battlegrounds such as Ohio, Michigan and Wisconsin.

GOP losing ground in Texas cities

The key to Texas' political future is whether it finally follows the geographic realignment that has transformed the politics of many other states over the past quarter century.

Across the country, Republicans since the 1980s have demonstrated increasing strength among voters who live in exurbs at the edge of the nation's metropolitan centers or beyond them entirely in small-town and rural communities. Democrats, in turn, have extended their historic dominance of the nation's urban cores into improved performance in inner suburbs, many of them well educated and racially diverse.

Both sides of this dynamic have accelerated under Trump, whose open appeals to voters uneasy about racial, cultural and economic change have swelled GOP margins outside the metropolitan areas while alienating many traditionally center-right suburban voters.

In Texas, only half of this equation has played out. In presidential elections since 2000, Republicans have consistently won more than two-thirds of the vote for the two parties in 199 mostly white nonmetropolitan counties across the state, according to a study by Murray and Renee Cross , senior director of the University of Houston's Hobby School of Public Affairs. (Trump in 2016 swelled that number to three-fourths.) The GOP has attracted dominant majorities from those areas in other races, from the Senate and US House to the governorship and state legislative contests. Democrats consistently amassed big majorities in 28 mostly Latino South Texas counties, but they have composed only a very small share of the statewide vote.

The key to the GOP's dominance of the state is that through most of this century it has also commanded majorities in the 27 counties that make up the state's four biggest metropolitan areas: Dallas/Fort Worth, Houston, San Antonio and Austin. Demographically similar places in states along the coasts and in the upper Midwest have moved consistently toward the Democrats since Bill Clinton's era. But in Texas, Republicans still carried 53% to 59% of the vote in those metropolitan counties in the four presidential races from 2000 through 2012, Murray and Cross found.

In the Trump era, though, that metro strength has wavered for the GOP. In 2016, Hillary Clinton narrowly beat Trump across the 27 counties in Texas' four major metropolitan areas. Then in 2018, Democrat O'Rourke carried over 54% of the vote in them in his narrow loss to Sen. Ted Cruz , Murray and Cross found. O'Rourke won each of the largest metro areas, the first time any Democrat on the top of the ticket had carried all four since native son Lyndon B. Johnson routed Barry Goldwater in the 1964 presidential race, according to Murray and Cross.

Looking just at the state's five largest urban counties -- Harris (Houston), Travis (Austin), Bexar (San Antonio), Tarrant (Fort Worth) and Dallas -- the change is even more stark. In 2012, Obama won them by a combined 131,000 votes. By 2016, Clinton expanded the Democratic margin across those five counties to 562,000 votes. In 2018, O'Rourke won those counties by a combined 790,000 votes, about six times more than Obama did in 2012. Along the way, Democrats ousted Republican US House incumbents in suburban Houston and Dallas seats and made substantial gains in municipal and state house elections across most of the major metro areas.

"We have now turned every major metropolitan area blue," says Glenn Smith, a longtime Democratic strategist in the state.

Growth explodes in big metro areas

Yet that, of course, still wasn't enough for O'Rourke to overcome Cruz's huge advantages in smaller nonmetro communities. That outcome underscores the equation facing Texas Democrats in 2020 and beyond: They must reduce the GOP's towering margins outside of the major metropolitan areas and/or expand their own advantage inside the metro centers.

Few in either party give Democrats much chance to record many gains outside of metro Texas, especially given Trump's national strength with such voters. O'Rourke campaigned heavily in Texas' smaller counties and made very limited inroads there, even relative to Clinton's abysmal performance in 2016. Exit polls conducted for a consortium of media organizations including CNN found that O'Rourke carried just 26% of white voters without a college education, only a minuscule improvement from the 21% Clinton won in Texas in 2016.

O'Rourke's very limited rural gains have convinced many Texas Democrats that while they can't entirely abandon smaller parts of the state, their new votes are most likely to come from the metropolitan centers.

"It's a matter of emphasis," says Smith, a senior adviser to the liberal group Progress Texas. "You've got to do urban/ suburban areas first. You've got to maximize your advantage there."

The stakes in the struggle for Texas' big metro areas are rising because they are growing so fast. While the four major metro areas cast about 60% of the statewide votes in the 1996 presidential election, that rose to about 69% in 2016 and 2018, Murray and Cross found. Murray expects the number to cross 70% in 2020.

And the concentration of Texas' population into its biggest metropolitan areas shows no signs of slackening. The Texas Demographic Center, the official state demographer, projects that 70% of the state's population growth through 2050 will settle in just 10 large metropolitan counties. Those include the big five urban centers that O'Rourke carried as well as five adjacent suburban counties; those adjacent counties still leaned toward the GOP in 2018 but by a much smaller cumulative margin than in the past. Overall, O'Rourke won the 10 counties expected to account for the preponderance of the state's future growth by a combined nearly 700,000 votes.

This urbanization is unfolding together with growing diversification. From 2010 through 2018, the US Census Bureau found , non-Hispanic whites accounted for only 14% of Texas' population growth; Asian-American growth roughly equaled whites', African Americans slightly exceeded both and Hispanics dwarfed all three -- they accounted for over 55% of Texas' population growth in that period.

An analysis conducted for a consortium of progressive groups similarly found that minorities will account for fully 88% of the newly eligible Texas voters between 2016 and 2020, with Hispanics alone accounting for 60%, according to sources familiar with the study. The Texas Demographic Center forecasts that Hispanics could supplant whites as the state's largest population group by as soon as 2022.

The challenges for Democrats

But the impact of this demographic change has been blunted by consistently low turnout for nonwhite voters in Texas, where Democrats and other liberal groups have lacked the funds to conduct meaningful voter drives for years, and GOP-passed laws, from strict voter identification requirements to limits on voter registration drives, have erected hurdles to greater minority participation. Only about one-third of eligible Hispanics turned out in 2018, the Census Bureau reported.

Democrats are cautiously hopeful that a backlash against Trump in minority communities will improve their turnout in 2020, particularly after a young white man echoed Trump's language of "invasion" before carrying out the recent mass shooting in El Paso.

"That's always this question I have been hearing since I got here: What is going to increase Hispanic turnout in Texas?" said Joshua Blank, manager of polling and research at the University of Texas at Austin's Texas Politics Project. "I think the idea of a white supremacist, in the political environment we're in, specifically targeting a majority Hispanic city like El Paso ... is likely to be a pretty good wake-up call. But we'll see."

It's possible that greater minority engagement could increase the nonwhite share of the Texas vote from the 43% that exit polls recorded in 2016 and 2018. But given Trump's ability to mobilize turnout among his preponderantly white non-urban base, even greater minority participation might be offset by high turnout among rural whites.

The sheer weight of the state's urbanization and diversification will eventually undermine a Trump-type strategy that focuses on maximizing the party's margins outside metro areas at the price of eroding its strength within them. But to close the gap in the next few elections, Democrats may need not only greater turnout but also slightly improved vote shares among their best groups: minorities and especially college-educated white voters.

In contrast to O'Rourke's limited gains among blue-collar whites, exit polls did show him improving substantially with those college-educated white voters: O'Rourke carried 44% of them, up from just 31% for Clinton two years earlier. The most recent Quinnipiac University Poll in Texas showed that among those voters only a narrow 52% to 43% majority approved of Trump's performance. Quinnipiac found a sharp gender gap, with 56% of college-educated white men approving of Trump and 54% of women disapproving.

Still, those numbers are notably better than Trump's showing with those college-educated white voters in most national surveys. And they reflect the challenge Democrats face expanding beyond the beachheads they have established in suburban Texas communities.

One is that more white suburbanites in Texas than elsewhere are evangelical Christians, perhaps the group now most staunchly supportive of Trump and the GOP. In 2018, the exit polls found that about 40% of college-educated white voters in Texas identified as evangelicals, and they backed Cruz by overwhelming margins, according to figures provided by Edison Research, which conducts the exit polls.

Also, as Blank says, whatever their religious affiliation, Texas suburbanites are marinated in a political culture much more conservative on almost all issues than comparable suburbs elsewhere. Democrats offering big new programs and higher taxes may still face more resistance in the suburbs of Texas than states such as California and Colorado, particularly among men.

"Regardless of the rapid demographic change that is going on in the state, it still maintains a pretty conservative political culture writ large," Blank says. "In a place like Texas, as opposed to some of these upper Midwest or Northeastern states, by no means does going to college here mean you are having an overwhelmingly liberalizing experience. Some of these schools are tied to rural Texas and Christianity: It is not like we have Yale and Harvard and Swarthmore down here."

Still, Blank notes, the diverse young families now filling the suburbs of Texas' largest metropolitan areas are very different from the predominantly white families who powered their first wave of growth after the 1960s: While those earlier suburbanites were largely fleeing racially diverse cities, their successors today want to remain close to the cities while securing more affordable housing. "Fundamentally, that's a different kind of mindset," he says, "and that's a mindset that tends to align more with Democratic Party values."

For 2020, both sides are preparing extensive voter-mobilization efforts targeted mostly at the major metropolitan areas. Dickey says the state GOP, which for years faced little effective challenge to its control, will launch a major organizational effort next year with both paid staff and volunteers to roll back the 2018 Democratic gains in the big population centers.

"The question is whether that was a trend or a dip," he says. "The answer is that depends on us. Will we do the work necessary to win back the geographic areas that we had as recently as 2014?"

But Murray says that in Texas, as in other states, Trump's racially divisive messaging leaves the GOP facing a stiff headwind in metropolitan areas growing mostly with minority and well-educated white voters. "Trump is killing the urban Republican Party," Murray says flatly.

If that proves true even in Texas, whether in 2020 or soon after, it will fundamentally reshape the national electoral landscape.