Carly Fiorina at the Heritage Foundation’s 2016 President’s Club meeting in Washington on Tuesday. Fiorina spoke Saturday at a retreat for Virginia Republicans. (Cliff Owen/AP)

Carly Fiorina praised Donald Trump’s “brilliant” moves as president-elect on Saturday as she formally endorsed Republican Ed Gillespie for Virginia governor and looked ahead to her Monday visit to Trump Tower in New York.

Her remarks, made at a retreat for Virginia Republicans, could help patch up her rocky relationship with Trump as she is considered for an administration job — and give Gillespie a boost with Trump supporters as he seeks his party’s nomination in a June primary.

Fiorina, the former Hewlett-Packard chief executive and one of many runners-up to Trump in the GOP primary, has had a bitter relationship with the Manhattan real estate mogul, who disparaged her appearance during the primary. She called on Trump to drop out of the race in October, after he was heard bragging about groping women on an 11-year-old recording.

“Donald Trump does not represent me or my party,” she said on Twitter at the time.

But Fiorina, a Northern Virginia resident often mentioned as a potential U.S. Senate candidate in 2018, heaped praise on Trump on Saturday, when she spoke to hundreds of state party leaders, elected officials and activists at an annual gathering known as the Republican Advance.

“One thing President-elect Trump clearly understands is this: that actually changing an ingrained, embedded status quo requires a major shock to the system,” she said. “It can’t be such a violent shock that you put the patient in cardiac arrest, but you have to have a signal strong enough that people understand change is actually coming. So I think the Carrier deal was brilliant.”

Fiorina was referring to Indiana-based Carrier, a manufacturing firm that scaled back plans to move some jobs to Mexico after Trump blasted the planned move during the campaign. Critics have said the number of jobs saved was inflated; it’s 730, not 1,100 as Trump has said. Others have noted that company, which still plans to ship 700 factory jobs to Mexico, exacted $7 million in state tax credits for scaling down the move.

Fiorina acknowledged those complaints but said the symbolism is more important than the details.

“But nevertheless, it was brilliant because it was a signal,” she said. “It was a signal to working men and women across this nation that, ‘I have your back. I have not forgotten you.’ ”

The crowd at Richmond’s Omni hotel responded with hearty applause. It did so again as Fiorina praised Trump’s decision to take a protocol-busting phone call from Taiwan’s leader. She called that similarly “brilliant” move — precisely because it irked China, which considers Taiwan a breakaway province.

“With that phone call, President-elect Trump said [to China], ‘We are not playing by your rules,’ ” she said.

Fiorina opened by formally endorsing Gillespie, a former counselor to George W. Bush who nearly upset Sen. Mark R. Warner (D-Va.) in 2014.

Like Fiorina, Gillespie has not always had a cozy relationship with Trump. He kept his distance during the race, stumping with Vice President-elect Mike Pence but avoiding any appearances with the top of the ticket.

Gillespie’s two GOP rivals were closer to Trump, whose highly energized supporters could be key to winning the nomination in a June primary.

Corey A. Stewart, chairman of Prince William’s board of county supervisors, chaired Trump’s Virginia campaign until the final weeks of the race. He was eventually fired for taking part in a protest outside Republican National Committee headquarters that accused the party establishment of trying to undermine Trump.

State Sen. Frank W. Wagner (R-Virginia Beach) initially supported Ohio Gov. John Kasich but got fully on board with Trump once he locked up the nomination.

A fourth Republican — Denver Riggleman, who owns a craft distillery west of Charlottesville — signaled interest in jumping into the race by holding a reception during the retreat. Statewide office-seekers use the retreat to woo activists and demonstrate financial strength by hosting receptions during the Advance.

Riggleman, owner of Silverback Distillery in Afton, has fought to ease regulations on distilled spirits. He said he also has battled with Dominion Virginia Power over a proposed pipeline that would cross his property. He had not made a decision about whether to run but had formed a political action committee with the slogan: “Blowing the whistle on government cronyism.”

“In this climate, non-politicians have a chance to do something good,” he said.

Many of those attending were elated by Trump’s win, despite his failure to carry Virginia, and hoped it would energize Republicans for the 2017 governor’s race. The GOP has not won a statewide race in the state since 2009.

But it was not immediately clear how “the Trump effect,” as former Congressman Eric Cantor called it, will play out in Virginia next year. Mike Rubino, who was Trump’s senior Virginia adviser during the campaign, handed out stickers playing up Stewart’s firing.

“Mr. Trump said: ‘Corey, you’re fired!’ ” they read. Rubino said that he handed the stickers out on his own volition and that he was not affiliated with any rival gubernatorial campaigns.

Stewart nevertheless claimed the Trump mantle as his most outspoken Virginia supporter. He billed his reception as a “Deplorables’ thank you party.”

But Gillespie also touted his support from people across the party, rolling out a string of endorsements last week that included Trump backers, establishment figures and Christian conservatives such as state Sen. Richard H. Black (R-Loudoun).

“I feel like we’re bringing the party together,” he said. “People are hungry to win here in Virginia.”

Wagner also claimed broad support, from urban commuters who appreciated his leadership on a highway legislation to blue-collar workers he’s known as a shipyard owner.

“I don’t know if the Trump effect is here to stay,” said Eric Cantor, the former Republican House majority leader, who lost a GOP primary to tea party-backed Dave Brat in 2014. Cantor spoke at a reception honoring Gov. Robert F. McDonnell (R), who recently emerged from a long gifts scandal a free but tainted man. New Jersey Gov. Chris Christie (R), also scarred by scandal, also appeared at the event, which was closed to the media.