HOUSTON — Texas Democrats surged to the polls on Tuesday in the first primary of 2018, demonstrating a wave of Trump-inspired energy, but also showcasing party divisions that have emerged at the outset of an otherwise promising midterm campaign.

Nearly 886,000 Texans cast ballots early in the state’s 15 most populous counties, the highest early-vote turnout in a nonpresidential election year in state history. And more Democrats statewide voted early this year than even in 2016, the year that Donald J. Trump, a Republican, was elected to the White House.

Yet even as Democrats in the state’s biggest cities came out in large numbers, Republicans still cast more ballots over all thanks to their rural strength.