Jim Gilmore may be a former governor, state attorney general, Republican National Committee chairman and presidential candidate. But he couldn’t get elected as a delegate to his party’s national convention.

When delegates were selected at Virginia’s state convention in Harrisonburg this past weekend, Gilmore, 66, put his name forward and was shut out.

The process was heavily politicized, as supporters of Sen. Ted Cruz (Tex.) maneuvered to elect a delegate slate that they hope will block billionaire Donald Trump from winning the Republican nomination for president.

While Trump won Virginia’s March 1 primary and garnered twice as many votes as third-place finisher Cruz, the party activists at the state convention picked 10 Cruz supporters and three Trump supporters to head to Cleveland.

Gilmore said he had been “informally assured” that he would be on the delegate slate — “that it was a no-brainer.”

But that was before the “strong-arm tactics at the convention” forced him out, he said.

The nominations committee largely tossed out the tradition of rewarding old guard statesmen such as Gilmore and instead paid deference to grass-roots activists who have steadily taken over party leadership in Virginia, observers said.

Cruz “is trying to take a state where the people went and voted in an open primary for Donald Trump and convert that into a Ted Cruz state,” Gilmore added. “It was a very ruthless display.”

Gilmore has not endorsed a candidate in the presidential race since ending his own bid on Feb. 12. His endorsement would likely not mean much — he won 145 votes while running for president.

But his neutrality made him unappealing to both sides in the delegate fight.

“They were decapitating any potential for alternative leadership on the delegation,” Gilmore said.

Virginia is sending 49 delegates to the national convention in July. Thirty-three will be chosen at district conventions; three are top party officials. While all 49 are committed to their state’s primary results — Trump — on the first ballot at the convention, they can vote as they choose on a second ballot.

Cruz is betting that Trump will not win the 1,237 delegates needed to clinch the party’s nomination on the first ballot.

Months ago, the Cruz campaign recruited Virginia activists with a mastery of the arcane procedure of electing delegates to the national convention. The nominations committee produced a slate that balanced the Cruz campaign’s dominance among the 2,610 people who filled the arena with the need to appease Trump supporters.

Neither side could predict whether the 10-3 slate would win, but it passed on one vote. Had it not, Cruz supporter and former Virginia attorney general Ken Cuccinelli II said in an interview that the Cruz campaign was prepared to support a slate of 13 Cruz supporters. The Trump campaign promised to push for a slate that matched the primary results with five Trump, three Cruz, one Kasich and four undecided delegates.

Ken Cuccinelli, the former state attorney general who has been campaigning around the country as a Cruz surrogate, said the fight for delegates between Trump and Cruz took precedent over making room for Gilmore and other figures in the state party.

“There’s no question that this year the competition for these delegate slots is exactly that - a competition,” Cuccinelli wrote in an email. “In most years, accommodating all sorts of different folks, good volunteers, party donors, and former high elected officials has been a relatively high priority in most states (including Virginia). But that has been because the competition was already over when we got to the state convention, obviously, that is not the case this year, so it has changed everything.”

Gilmore will have a role in the 2016 election in his home state — he’s leading field operations for the Virginia GOP. And he’s still planning to go Cleveland for the national convention.

“Technically,” he noted, “I’m still a candidate for president.”

Jenna Portnoy contributed to this report.

Correction: An earlier version of this report gave an incorrect city for Virginia’s state convention; it was in Harrisonburg.