Former Virginia attorney general Ken Cuccinelli II testifies on Capitol Hill earlier this year. (Molly Riley/AP)

Ken Cuccinelli II, the polarizing former Virginia attorney general, said Saturday that he will not run again for governor, scrambling the contest and opening the door for a far-right conservative to vie for the Republican nomination in 2017.

An active surrogate for Sen. Ted Cruz’s presidential bid, Cuccinelli has been traveling the country in support of the senator from Texas while overseeing the campaign’s delegate-selection process in Virginia.

“I made my choice here, and it was to go all in on the Cruz campaign,” he told The Washington Post in an interview at the state Republican convention here. “There’s only so much that makes sense on an individual and family basis. . . . It’s better for our family not to do both.”

The decision left some wondering whether Cuccinelli might serve as attorney general in a possible Cruz administration or run for the U.S. Senate, both posts that would give him opportunities to rein in what he sees as federal overreach.

As Virginia’s attorney general, Cuccinelli built a national profile and became a hero to tea-party-influenced conservatives by waging battles against abortion rights, climate science and the Affordable Care Act.

Longtime GOP strategist Ed Gillespie, shown here during his 2014 campaign for the U.S. Senate, is expected to run for Virginia governor. (Bill O'Leary/The Washington Post)

Democrats successfully painted him as too extreme for Virginia in the 2013 race for governor, allowing Democrat Terry McAuliffe to narrowly defeat him with an unabashedly liberal message on gay rights and gun control.

A second Cuccinelli candidacy for governor would have given Lt. Gov. Ralph Northam, a 2017 hopeful, an easy target for Democratic vitriol. That anger was briefly activated in the recent legislative session when the Republicans considered nominating Cuccinelli to the state’s Supreme Court.

“His right-wing radical agenda is not the sort of future Virginia families are looking for,” Anna Scholl, executive director of the left-leaning Progress Virginia, said Saturday.

Cuccinelli’s decision removed a major obstacle to the party’s nomination for Ed Gillespie, the longtime GOP strategist and former White House counsel who is trying to appear as the inevitable candidate with a robust fundraising operation and early establishment endorsements.

“Ken and Teiro are friends to Cathy and me,” said Gillespie, referring to the men’s wives. “I respect him. Whether he were to run or not run was never going to change that. I appreciate all he’s doing at the national level in the presidential campaign. I know how much work that is.”

Gillespie came close to unseating U.S. Sen. Mark R. Warner (D) last year after winning a convention with a focus on growing the economy, but the day-long party-run gatherings usually produce conservative candidates in the mold of Cuccinelli.

That’s a slot Rep. Rob Wittman would like to fill. He’s running for reelection to the House and recently formed a political action committee to raise money to run for governor with a small-government message.

“The idea that money and endorsements somehow predicates somebody should be elected is not what these races are about,” he said in an interview. “These races are about the people that will make the decisions at the convention. That’s where I have placed my emphasis.”

Both men worked the crowd Saturday at a state convention where vendors gave out “Guns Save Lives” stickers and speakers railed against McAuliffe and Hillary Clinton, the Democratic front-runner in the presidential race. The scene is a taste of the spectacle that could play out at a convention next year.

“The 2017 Republican convention will be messy and competitive,” said Emily Bolton, spokeswoman for the Virginia Democrats. “History has shown that these conventions produce far-right candidates who are out of the mainstream for Virginia voters. Look no further than today’s RPV Convention to see the degree in which Virginia Republicans remain bitterly divided over issues, candidates and party politics.”

Democrats still fume over Cuccinelli’s promise as attorney general not to defend members of the state health board if they backed away from strict, ­hospital-style building regulations of abortion clinics. They believe he wasted taxpayer dollars on a string of high-profile lawsuits challenging the Affordable Care Act and seeking the records from Michael Mann, a climate scientist who at the time worked for the University of Virginia.

Stephen J. Farnsworth, a political scientist at the University of Mary Washington, said Cuccinelli’s decision represents an opportunity for Gillespie and Wittman. Others toying with a run include Corey Stewart, chairman of the Prince William Board of County Supervisors, and Shak Hill, who unsuccessfully ran against Gillespie for Senate last year.

“It spares the party what would have been a nasty fight between two different visions of where the party should go,” Farns­worth said.