SAN MARCOS, Texas -- It has been precisely 40 years since the Lone Star State cast its big electoral clout behind a Democrat for president. Yet suddenly, Texas is closer to doing so again than it has been in all the years since.

While much attention has been fixed on the map of traditional battleground states like Virginia and North Carolina, as well as new and unexpected ones like Arizona and Georgia (both traditionally Republican) all of them may be eclipsed over the long term by what is happening in Texas.

Like a big rain at the end of a long dry spell, the political skies over Texas are turning increasingly purple and putting into play the state's 38 electoral votes, more than any state except California. Texas has been a land of Republican domination by huge margins, and yet the Republican advantage here has consistently dropped this year to as low as a single percentage point.

Tim Brinton/NewsArt.com

It's easy to lay the blame at the shiny Oxford shoes of the Republican nominee, Donald Trump, who has managed to alienate so many people, from Hispanics to white males alike. Yet, something more fundamental is happening. Yes, Texas is becoming less white and more diverse. But even more importantly is the permanent altering of the landscape: Those wide open spaces are finally filling up. And the rolling landscape around this once sleepy college town is proof positive.

This election year, Trump has sunk to new lows not seen since Jimmy Carter barely bested Gerald Ford in 1976 by fewer than 60,000 votes. Ever since, Texas has been a runaway steed for Republicans. Ronald Reagan won by more than 1 million. George H.W. Bush won by 700,000. His son's margin soared to nearly 2 million. John McCain cleared hundreds of thousands.

President George W. Bush speaks to supporters at a campaign rally in Reunion Arena in Dallas, Texas Monday, November 6, 2006.

Mitt Romney won Texas by 16 percent. In contrast, Trump's margin dwelled in the basement of double digits even when he was the clear front-runner in the spring. Ever since, polls conducted by the University of Texas Polling Project have displayed a candidacy in a slow spiral, down to a seven-point margin among likely voters -- and just a single point among registered voters in a survey for the Texas Lyceum.

If Trump has been consistent at anything in Texas, it has been in his direction: down. Other polls track in the same direction. This is no mere tightening of a race entering the homestretch. The Washington Post reported a single-digit lead in August among registered voters. Likely voters tend to turn out at rates of 85 to 90 percent and are a more reliable gauge, so the Morning Consult gave Trump a six-point edge among them.

"Texas is not a pure red state anymore," said Kyle Dropp, the Morning Consult's research director, who now rates Texas as just leaning Republican. "It's very purple, particularly because of the Hispanic population." Yet there is more than demographics at work. "The combination of the slow march of demographic change and Trump's rhetoric," according to UT's Joshua Blank, "appears to have made Texas' registered voter pool more Democratic than we have seen in previous presidential races."

Political analysts love to argue about whether the Hispanic vote will really turn out and, if so, whether it will make a difference. But in focusing on demographics they're ignoring geography. The Lone Star State encompasses nearly 269,000 square miles, more than France.

Big stretches are wide open and probably always will be. Much of the lonesome Trans-Pecos is dotted only by creosote, windmills and little windblown highway towns like Ft. Hancock and Van Horn. Out on the high plains of the Panhandle, the only constant companion can still be the wind.

But the Texas Triangle, 60,000 square miles anchored by Houston, San Antonio, Austin and Dallas-Ft. Worth, has drawn nearly 7 million people since 2000. It is filling up with newcomers, with a flow of migrants from California and New York, as well as immigrants from Latin America, Asia and Africa. Some 70 percent of the population growth of the state is concentrated here.

To put that into perspective it's like adding another Dallas, a Hong Kong or a Nanchang every 15 years. The farms of the rolling countryside here are plowed under daily to make way for the relentless march of suburban tract homes.

Up and down Interstate-35, once small, sleepy towns like Georgetown and New Braunfels top the list of fastest-growing small, American cities as their once rural counties turn into bedroom communities for commuters. More farm and ranch land is plowed under in Texas each year than any other state. This is where the suburban counties formed a bulwark for Republicans controlling the state's politics; about 13 counties have made the difference between winning and losing statewide. Some, it's true, are as Republican as ever. Near Houston, Montgomery County's strong Republican preference is unchanged since 2000.

But little by little, the map changes hues. The big cities and metropolitan counties long ago slipped the GOP's grasp. Among the counties in Central Texas, Hays County is a prime example of the social and political change sweeping aside tall pastures and mesquite thickets. For decades, San Marcos was just a sleepy little college town on a crystalline river. The state university's most famous alumnus was Lyndon Johnson and its most common pastime was tubing downriver on beer-soaked, hot summer days.

But quickly, it grew. In 2000, George W. Bush won twice as many votes as Al Gore's vote in Hays County, to 20,000 to 10,000. Four years later, the number of voters had climbed to 40,000, but Bush beat John Kerry by just 7,000 votes. In 2008, John McCain held off Barack Obama by fewer than four points. Four years later, San Marcos, the county seat, was the fastest-growing city in America and Mitt Romney improved his margin, but only to 10 points -- far below the heyday.

By 2014, San Marcos was the fastest-growing city in the nation for the third year in a row, swelling at nearly 40 percent per year. Today, the university injects $1 billion into the local economy and streets are constantly being ripped up and widened. Here, people live cheek-by-jowl at nearly 1,700 per square mile. That's nearly 1,700 times more dense than the state. It's about the same density as Miami or New York.

Tubers and swimmers have fun on the San Marcos River at City Park off of Cheatum Rd just west of I-35 in San Marcos, TX. The spring-fed river has become increasingly popular with tubers over the last few years and is now becoming more policed to curb under-aged drinking, lewd behavior and litter problems. (Austin American-Statesman)

In these high-density environments some things do not thrive as they did in the wide open spaces. One is the fishhook cactus. Another is conservative politics. Out of the 100 most populous cities in the country, for example, fewer than a third are run by Republican mayors. Dense living means more demand for services, public institutions and a greater sense of shared fate than, say, a solitary rancher up in Tom Green County. For Republicans, the thunderclouds on the horizon must be troubling: some 35 million Texans will crowd into the Triangle by 2050, on par with today's Northeast Corridor from Boston to New York to Washington.

The smart money says Hillary Clinton loses Texas, despite a University of Houston poll putting her up by 10 points in Harris County, once Bush country. The cautious money says ad money will go farther in Virginia and North Carolina than Texas' multiple major media markets. But the long money says the fact that Texas is in play alone is historic; just taking it out of the predictably red Republican column will alter national politics all by itself.

There's nothing wrong with Republicans governing Texas, but it is inherently unhealthy for any one party to monopolize power in a state of 26 million people and counting; competition is as good for the body politic as the economy.

So the change is like a big rain after a long drought, a frog strangler. The clouds build up slowly untill they blot out the bright orange of dusk. And right before the deluge, right before dark, the sky turns a beautiful and foreboding shade of purple.

Richard Parker is lecturer-of-practice in journalism at Texas State University and author of Lone Star Nation: How Texas Will Transform America. Twitter@richardparkertx