Ending a streak of thin electoral margins, Harris County — the biggest battleground in ruby red Texas with a population larger than 25 other states — turned solidly blue on Tuesday with the largest presidential margin of victory in more than a decade.

The blue wave was apparent up and down the ballot on a banner night for the county's Democrats.

They swept up every single countywide seat, including the district attorney and sheriff’s offices. They flipped a Texas House district in Pasadena. And with a presidential fight at the top of the ticket, Democrats shored up their lead in the fight for the typically purple county with Hillary Clinton beating Donald Trump by more than 160,000 votes — up from the 971 votes with which Obama took the county in 2012.

Gov. Greg Abbott on Wednesday chalked up Republican losses in urban areas to increased turnout in presidential years, which tends to benefit Democrats.

“Remember in both ‘08 and ’12, there were sweeps in Harris County and then during the gubernatorial election, we won ‘em back,” Abbott said in a phone interview. “And so this was really just kind of an echo of what happened the last few presidential cycles and little more than that."

But with an incredibly diverse population that only continues to grow in the state’s biggest county, it appears that — more than in previous elections — demographics determined the electoral outcome in Harris County.

Despite little overall change in areas of the state with large Hispanic populations, it appears Hispanic voters were, in part, behind Democrats’ victories in Harris County.

About 17 percent of in-person early voters in Harris County had a Hispanic-sounding surname — up from 11 percent in 2012, according to Hector de Leon, director of communications and voter outreach for the county clerk.

Election Day voting numbers are still being crunched, but if turnout among Hispanic voters remained unchanged from the last election — and there’s little reason to believe it worsened — it may have increased by about 34 percent on Tuesday, de Leon said.

“My sense is that they did outperform their Election Day turnout [in 2012], or they at least matched it,” de Leon said, “and if they matched it, there would be an increase.”

That possible increased turnout comes as Harris County becomes increasingly nonwhite.

During the last open presidential election in 2008, 39 percent of Harris County’s then 3.9 million residents were Hispanic, according to census estimates, compared to 36 percent who were white.

Census estimates for 2016 aren’t available, but state demographer projections indicate that Harris County’s share of white residents would fall to 28.5 percent this year, while the Hispanic population would increase to 44.7 percent, with more than half of the Hispanic population of voting age.

But the electoral contours in Harris County aren’t simply attributed to a shrinking white population.

“In the short term, Trump was not a good candidate for many, many Texans, including some Republicans, and that’s reflected in the turnout,” said Bob Stein, a Rice University political scientist who has been crunching turnout numbers in Harris. But the county is also beginning to see the effects of Hispanics, who tend to lean Democratic, “aging up” and replacing older white voters who are literally dying off, he added.

Democrats push back against the idea that they’re only winning because of demographic change. Lane Lewis, chairman of the county’s Democratic Party, attributes it to the party’s affinity to the “priorities and needs of those varying demographics.”

“They don't vote for us because they’re black, brown or gay,” Lewis said. “They vote for us because we speak in concert with things that are important to them.”

Harris County Republican chair Paul Simpson, who did not respond to a request for comment, previously said the party was working to “fight the Democrats on their turf" but also acknowledged they were working against a motivation problem amid a lack of GOP enthusiasm after a presidential primary that left many disillusioned.

But when the dust settled on a shocking Trump victory nationally, it was clear that enthusiasm in Harris County for the raucous billionaire didn’t just come up short — it tumbled below the last three presidential elections. Not only did fewer Republicans cast a ballot for their party’s presidential nominee but their total votes came close to 2000 levels.

Trump won just 544,960 votes in Harris County. In 2000, President George Bush won 529,159. Meanwhile, total Democratic votes for the top of the ticket increased from 418,267 in 2000 to 706,471 this year.

“Demographics have an impact on elections,” de Leon said. “Harris County is an example of that.”

Republicans saw some success on Tuesday night, holding onto a second Texas House seat Democrats had targeted. And they maintained control of their seats on the county commissioner's court. But in the days following the election, they’ve conceded they took a beating in Harris County.

In emails to supporters, prominent local conservatives called it “the worst defeat for Republicans” in the 71-year history of the county’s Republican party. Citing losses in Dallas and Houston, Abbott in a Thursday email to supporters said "the threats to the Lone Star State remain very real." And discussing a need to focus on down-ballot races after tough losses, Republican Lt. Gov. Dan Patrick, whose son lost his judgeship in Harris, said Republicans must continue reaching out to Hispanic voters.

Read related Tribune stories:

Experts and pundits predicted that Hispanics would vote in record numbers to express their displeasure with Donald Trump. In Texas, it doesn't look like that happened.

With everyone crowing about the rush of early voters in Texas this election, it's worth noting that we're still a state with low overall voter turnout. We run the numbers.

Patrick Svitek contributed to this report.