Even as his campaign struggles for survival, Sen. Ted Cruz dominated weekend delegate selection contests that he and other Republicans hope could block Donald Trump from winning the party’s nomination at their national convention.

From Virginia to Arizona, the Texan nearly ran the tables at state party conventions where delegates were picked to attend the July meeting in Cleveland.

Trump has won the most state primaries, including a sweep of five Northeastern states on April 26, and has gained over 10 million votes from primary and caucus voters so far, to Cruz’s 6.9 million. Yet Cruz’s campaign has repeatedly shown superior organization and understanding when it comes to the arcane delegate-selection process and his quest to secure people loyal to him at a possible contested convention.

“It is going to be a contested convention,” Cruz said Sunday on ABC’s “This Week” broadcast.

Cruz’s delegate wins could be merely symbolic, though, if Trump secures the 1,237 delegates needed to win the party’s presidential nomination. The real estate developer could still do that on June 7, when California, New Jersey and three other states hold the final set of Republican primaries, offering a total of 303 delegates.

There were also some signs this weekend that Trump’s campaign is getting better at grass-roots organizing. He scored delegate victories in Massachusetts and held his own in Arkansas.

Arizona was a Cruz blowout, even though Trump won the state’s March 22 primary with 47 percent of the vote to Cruz’s 25 percent. A slate backing the Texan won virtually all of the 28 at-large delegate slots and roughly split the 27 selected by congressional district, according to the Associated Press.

In Virginia, Cruz supporters won 10 of 13 delegate slots selected at a state convention, the Washington Post reported.

Delegates from Virginia, Arizona and many other states will be required to vote for Trump on the first ballot in Cleveland because he won their primaries and state party rules often require loyalty to the winner on the initial round.

It’s mathematically impossible for Cruz or Ohio Gov. John Kasich to win enough delegates for the nomination before the convention. Instead, the remaining Republican candidates, pared from an initial slate of 17, hope to prevent Trump from winning enough delegates for the nomination.

Tuesday’s Indiana primary will be a critical test for stop-Trump forces. Even Cruz has acknowledged that a Trump win there could make it impossible to block the front-runner from winning the nomination.