Donald Trump gave a speech during a Liberty University Convocation in Lynchburg, Va., on Jan. 18. (Drew Angerer/Bloomberg News)

With the departure of Ted Cruz from the presidential race Tuesday night, many national Republican loyalists lamented the future of a party that could field a nominee as polarizing as Donald Trump.

But the news was particularly jarring for Virginia Republicans fresh off two days of party warfare at a state convention where Cruz came out on top.

“All the divisiveness last weekend for nothing,” said Brian W. Schoeneman, a former member of the Fairfax County Electoral Board and a supporter of Ohio Gov. John Kasich, the establishment favorite who ended his long-shot campaign Wednesday. “We are the kings of self-inflicted wounds that get us nothing.”

At the other end of the spectrum, a Republican who identifies with the conservative wing of the state GOP said of Cruz’s decision: “I feel like I got smacked by a two-by-four.”

In the final hours of last weekend’s convention in Harrisonburg, Cruz and Trump supporters traded insults over the selection of 13 of 49 total delegates to the national convention in Cleveland.

Not that it matters now. Officially, the state party apparatus must quickly pivot to Trump, no matter how unenthusiastic some leaders may feel about the brash billionaire.

“The RPV will support the nominee 100 percent,” John Whitbeck, chairman of the Republican Party of Virginia, said Tuesday night — without mentioning Trump.

House Speaker William J. Howell (Stafford) released a lukewarm statement that said, in part: “I am a Republican, and I will support the Republican nominee.”

Trump’s Virginia campaign chairman, Corey Stewart, publicly derided the party as “rotten and corrupt” after being left off the delegates slate at the state convention.

But late Tuesday, after Cruz quit, Stewart’s message was all about unity.

“Now is the time for Virginians to come together and stand behind Donald Trump as the Republican nominee for President,” said Stewart, chairman of the Prince William Board of County Supervisors and a candidate for governor in 2017. “Virginia is an essential state this November, and all of us need to band together to defeat Hillary Clinton.”

Although it wasn’t a surprise, given Trump’s string of primary wins, the reality hit some hard.

“If you’re a conservative, it’s been a very long time since you could be happy with a presidential nominee,” said Steve Albertson, who is on the party’s governing board and runs the conservative Bull Elephant blog. “We’ve had two Bushes, John McCain, Mitt Romney — now this.” Al­bertson said he will nonetheless support Trump.

The reaction shows the schism between longtime state party activists and primary voters at large, who delivered Trump a decisive win on March 1.

David Ramadan, a former House of Delegates member from Loudoun County, has been a vocal member of the “Never Trump” movement. “Trump as the GOP nominee means a series of defeats for our Republicans in Virginia and the nation for a decade,” Ramadan said.

Minutes after Cruz suspended his campaign, Democrats sent out an “emergency” fundraising plea.

The email said, “We must win Virginia, or Donald Trump will be President.”