SUGAR LAND, Tex. — Nearly 700 miles from the El Paso Walmart where the suspect in the killing of 22 people Saturday denounced a “Hispanic invasion,” Rish Oberoi, a candidate for state representative, gestured toward a bustling dining room in a popular Vietnamese restaurant and marveled at the diversity of this Houston suburb.

“You’ve got every ethnicity,” Oberoi, the son of Indian immigrants, said of the lunchtime rush last Monday. “And that’s standard for Sugar Land.”

He was not overstating the case.

The residents in this county speak at least 118 languages, elected an Indian immigrant as their leader in 2018 and elevated the first Muslim to the Sugar Land City Council this year. Once represented by Tom DeLay, the hard-line House majority leader known as the Hammer for his ability to keep fellow Republicans in line, the county supported a Democrat for president in 2016 for the first time since Lyndon B. Johnson led the ticket.

The much-anticipated future of Texas politics may not have arrived statewide yet, but it is hard to miss in the booming, polyglot metropolitan areas that are changing the face of the state.

The El Paso massacre has brought into devastating relief the clashing ideologies and demographics that have placed a solidly conservative rural Texas in tension with the two forces powering Democratic gains: soaring immigrant populations and affluent white suburbanites who recoil from President Donald Trump’s race-baiting.

In recent days, both before and after the gunman opened fire on summer shoppers and the manifesto spouting hate was published, a handful of Republican lawmakers decided to retire rather than seek reelection to House seats in districts like this one, where the electorate includes both multiethnic voters and the kinds of disaffected moderates — even longtime Republicans — who have drifted from Trump’s party.

Last year, Reps. Lizzie Fletcher and Colin Allred defeated Republican lawmakers in metropolitan Houston and Dallas, respectively, and six other Republican incumbents won reelection by less than 5 percentage points.

Three of the six — Reps. Will Hurd, Kenny Marchant and Pete Olson — announced in recent weeks that they would not run again. Each of their districts is majority nonwhite.

“The 2018 election should have been a wake-up call for a Republican Party in Texas that has become too complacent,” said Karl Rove, the former adviser to George W. Bush, who built a multiracial coalition in his time as Texas governor. Rove urged Republicans to recognize that the state and country “are becoming more diverse and we need to reflect that.”

But the demographic shift is only part of the reason Democrats are surging in a state that now includes half of America’s 10 fastest growing cities. Texas’ population hubs are filled with college-educated, white transplants as well as native-born Anglos, as they are called here; many are political moderates turned off by Trump’s rhetorical rampaging and hard-line policies on immigration.

“Republican women are appalled at what’s coming out of the White House,” said Annise Parker, a Democrat who became Houston’s first openly gay mayor thanks in part to support from centrist Republicans. “It’s not that Texas is going to the left; it’s just that a lot of folks are saying, ‘Enough.’ ”

Sen. John Cornyn, a Republican facing reelection next year, has sought the more inclusive style. In 2014 he aired ads in English, Spanish and Vietnamese on his way to winning nearly half the state’s Latino vote against modest opposition.

The senator will be helped by a Republican Party more prepared than it was before El Paso-native Beto O’Rourke’s surprise strength against Cruz last year.

Still, Cornyn will surely face a tougher race than in 2014.

A handful of Democrats are locked in a primary now to determine Cornyn’s opponent, but O’Rourke’s impassioned, and viral, criticism of Trump in the aftermath of the El Paso massacre is leading to new calls for him to drop out of the presidential race, where his campaign has flagged, and return to Texas to challenge Cornyn.

“He just needs to get home and take care of business,” said Parker, noting that “we wouldn’t have five people running for Senate if Beto came back.”

More broadly, some Texas Democrats have wondered if a drawn-out presidential primary might complicate the party’s progress within state lines.

Gilberto Hinojosa, the chairman of the Texas Democratic Party, said Democrats would be wise to remember that many of the recent defectors to the party here are moderates.

“A lot of people in this state who vote for Democrats now didn’t use to vote for Democrats,” Hinojosa said. “I just don’t want us to mess this thing up.”