Texas Republican hardliners had seen this year's primary election as the moment they could finally take decisive control of the state Legislature after years of effort.
They fell just short.
Even as more than a dozen Republican incumbents were defeated by more conservative challengers, the party's veterans rallied to protect Texas House Speaker Dade Phelan from being ousted by activists backed by former President Donald J. Trump.
He won Tuesday's runoff election by fewer than 400 votes out of more than 25,000 cast, halting, at least for now, rapid change in the Texas House of Representatives, which has long served as the moderate arm of state politics.
How long the House will remain in this state was one of the biggest questions emerging from Tuesday's election. Though Phelan and several other high-profile candidates avoided defeat this time, the party's far right wing is confident they have not yet reached the peak of their power.
Across Texas, a total of 15 Republican incumbents have been ousted from the state House of Representatives by challengers this election cycle, with nine dropping out in March primaries and six more dropping out in Tuesday's runoff elections.
“The party is moving in my direction,” said Rep. Steve Toth, a Republican from suburban Houston who is aligned with Attorney General Ken Paxton, a leader of the party's more conservative wing. Toth spoke Tuesday outside a polling place in Bidor, Texas, wearing a red hat that read “Keep America Great.”
However, not all incumbents were ousted for the same reasons.
Some of them were targeted because of their votes last year to impeach Paxton on charges of corruption and abuse of power (the state Senate acquitted him). The challengers to the incumbent were largely backed by Paxton and Lt. Gov. Dan Patrick, with the backing of influential religious conservative billionaires Tim Dunn and Farris Wilkes.
In many other races, challengers were backed with millions of dollars in campaign contributions from school voucher advocates and Gov. Greg Abbott, a strong supporter of the voucher proposal to use federal funds to help parents pay tuition for private and religious schools.
The governor had been crisscrossing the state for months fighting back against Republican lawmakers who had blocked voucher legislation during the most recent legislative session. On Tuesday, Abbott declared victory. “The Texas Legislature has secured enough votes to pass school choice legislation,” he said in a statement.
Most of the candidates backed by Mr. Abbott and the national conservative anti-tax group Club for Growth won their elections, spending $4.4 million in the Texas House runoffs alone, including $1.5 million against Mr. Phelan.
“Had he continued to push forward with the governor's school choice bill, none of these challenges would have come to fruition,” the group's president, David McIntosh, said of Phelan. “He's sending a message across the country that if you're not in favor of school choice, you're not a conservative Republican.”
At the same time, there were signs that Republican veterans still held the upper hand in some key races.
Rep. Tony Gonzalez, a moderate Republican who represents a border district in Congress and was criticized by his state party for voting in favor of gun control and same-sex marriage protections, survived a challenge in the runoff by about 400 votes out of roughly 30,000 votes.
State Rep. Craig Goldman handily defeated a Paxton-backed candidate for the Republican nomination for a vacant Fort Worth-area House seat, winning about 63 percent of the vote in the runoff election.
Still, Jeronimo Cortina, a political science professor at the University of Houston, said Tuesday's election results show the party continues to move rightward. “Yes, that's true, 100 percent,” he said. “The next Congress is going to be even more extremely partisan.”
The political currents threatening the Republican incumbent this year have often been pulling in the same direction, but at times they have been at odds.
Many of the candidates, including Paxton and Patrick, also support education vouchers and are aligned with the Club for Growth, a group that has distanced itself from both Abbott and Trump.
But Paxton also fought Republicans who tried to impeach him, even if it meant taking on incumbents backed by the governor.
For Mr. Patrick, a supporter of school vouchers, his goal was even loftier: to turn the relatively moderate Texas House of Representatives into one that resembles the staunchly partisan Senate he leads.
“This is just one of the battles,” said Republican political consultant Derek Ryan, “and it's going to continue to be a battle in terms of what direction the party and the state are going to go.”
Patrick and other hard-line Republicans are vehemently opposed to the longstanding practice of having members of both the majority and minority parties serve as committee chairs in the Texas Legislature. They have attacked Phelan for perpetuating the practice and accuse him of appeasing Democrats to win support for the speakership.
Paxton expanded on that accusation Tuesday, saying Phelan exploited Texas' open primary system to garner support from Democratic voters.
Phelan said his campaign got a boost as the runoff neared its final stages with veteran voters such as former Gov. Rick Perry, who came to his aid when Phelan looked set to lose.
Phelan's campaign ultimately spent more than $12 million defending his seat in the southeast Texas district that stretches from Beaumont to the Louisiana border, according to filings through mid-May.
In an interview this month while campaigning for Phelan in China, Texas, Perry said he tried to focus his message on the interests of local voters. “I look at politics through the prism of the economy,” he said.
Phelan's seat in the Texas Legislature may be safe for now because he comes from a heavily Republican district, but his position as speaker may be in jeopardy. Minutes after the runoff results were announced, Paxton issued a statement warning Republican lawmakers not to support Phelan for the next speaker position.
“Ask my 15 colleagues who lost their reelection bid how they feel about their decision right now,” Paxton wrote. “If you vote for Dade Phelan again, you're not coming back!”
The victories of so many challengers could mean the next legislative session, the 89th in state history, will be one of the most conservative in Texas — or it could be one of the most chaotic, with the chaotic results of the runoff elections further intensifying the party leadership battle.
Republican state Rep. Nate Schatzlein, who aligns with Paxton, said on social media Tuesday night that “the 89th election is going to be a smash!”