Tensions among congressional Republicans fueled by the party’s diminishing electoral fortunes broke out into the open this week — as GOP lawmakers sparred over the shape of the next coronavirus aid package, how vigorously to stand behind President Trump and which primaries to wade into that could help determine control of the Senate in November.

In the Senate, GOP senators continued to struggle to find consensus on a massive spending bill aimed at mitigating the pandemic and softening its economic impact — a task complicated by the president’s insistence on a payroll tax cut that few in his own party want, intraparty feuding over the cost of the package and disagreements over exactly how the money should be spent.

Across the dome in the House, some of the Trump’s closest allies launched a surprising attack against Rep. Liz Cheney (R-Wyo.), the highest-ranking Republican woman on Capitol Hill, charging her with disloyalty to the president because she has bucked him on national security issues and embraced public health advice and officials of whom Trump has been dismissive.

And on Wednesday, allies of Senate Republican leaders formally threw their support behind the establishment choice in a heated GOP primary in Kansas, pitting themselves against a strong supporter of the president who was an early advocate of his immigration policies.

The battles this week were a microcosm of the broader reckoning over the party’s future and how strong the populist tenets of Trumpism will hold after the president leaves office. The fractures are emerging now because of worries that the party faces doom at the polls this fall owing to Trump’s handling of the pandemic and his resulting falling poll numbers against presumptive Democratic presidential nominee Joe Biden.

Trump came from nowhere five years ago to effectively take over the Republican Party, remaking it into a seeming cult of personality that has repeatedly violated the party’s supposed orthodoxies. But this week’s dust-ups are bringing into relief the fault lines and competing personalities that will define the coming war over the soul of the post-Trump GOP, whether that is after a single term or in another four years, with some appearing already to be jockeying for position in the 2024 presidential contest.

“I think [a] sure way to lose the Senate, and elect Joe Biden, is to allow Democratic politicians to keep the country shut down and keep 40 million people out of work,” Sen. Ted Cruz (R-Tex.), who ran for the party’s presidential nomination in 2016, said of the coronavirus package Wednesday. “Our focus needs to be on recovery, on getting people back in their jobs.”

Cruz vented his frustrations in private at a lunch Tuesday. As Republican lawmakers continued to add costly items to the ballooning virus aid package, he asked, “What in the hell are we doing?” Sen. Rand Paul (R-Ky.) was similarly vocal about spending concerns, even though others — such as Sen. Tom Cotton (R-Ark.) — argued in favor of spending a little more so that Republican senators in tough reelection races would have tangible policy wins to bring home for voters and help the party’s chances of retaining control of the chamber.

Cruz and Paul are reviving traditional fiscal concerns of the Republican Party that have diminished under the Trump presidency; the administration paid little attention to rising deficits as the GOP passed costly tax cuts and made pricey spending deals with Democrats.

Trump — who four years ago campaigned on a pledge to eliminate the national debt in eight years — has otherwise not concerned himself much with the amount of red ink dripping from the government’s ledger.

During his administration, the size of the national debt has ballooned from $19.9 trillion on his inauguration to $26.5 trillion today. The Treasury Department said last week that the nation’s budget deficit grew to a record-high $864 billion in June.

Brian Riedl, a senior fellow at the Manhattan Institute who speaks regularly with Senate Republicans, said that many GOP senators want to be much more aggressive about paring down the soaring deficit as soon as the economy recovers. Riedl also said some Republicans acknowledge that addressing fiscal issues beyond November will require putting tax increases on the table to appease Democrats.

“There is significant remorse over letting deficits rise by $9 trillion during the previous economic expansion,” Riedl said. “Of course, we’ve heard these concerns before, so we will see if they are willing to follow through.”

The administration and Senate Republican leaders are aiming for a $1 trillion coronavirus aid package, although negotiations continued throughout the day on Wednesday and senior GOP officials indicated that the earliest a plan would be released was Thursday. The main sticking point continued to be the potential inclusion of a payroll tax cut, although Republicans also were struggling to balance the push for more funding for testing and other priorities with concerns about the plan’s cost.

At the Capitol on Wednesday, Republican lawmakers acknowledged that nervousness about November was fueling the tensions.

“It always happens that way,” said Sen. Pat Roberts (R-Kan.), a retiring lawmaker whose would-be GOP successors are locked in their own intraparty brawl ahead of the Aug. 4 primary in the state. “People fuss and feud and fight and whatever — then after the election, they love each other.”

Yet the Republican infighting is spreading beyond policy disputes on the Hill.

The Senate Leadership Fund, the main super PAC dedicated to electing Republicans to the Senate, formally took a side Wednesday in a contested GOP primary for a candidate to succeed Roberts in Kansas. The super PAC’s aim is to stifle the chances of Kris Kobach, the controversial former Kansas secretary of state who lost a gubernatorial bid in 2018, prevailing in the Aug. 4 primary.

Jack Pandol, a spokesman for the super PAC, said the group on Thursday will launch a $1.2 million ad campaign promoting Rep. Roger Marshall (R-Kan.). The ads will run through the primary. The National Republican Senatorial Committee has not officially taken sides in the race, although establishment GOP figures have made clear publicly and in private that they think Kobach would risk handing a traditionally Republican seat to a Democrat in November.

Kobach is an immigration hard-liner whose approach is in line with Trump’s, and he shares the president’s belief, which is not backed up by the facts, that voter fraud is a significant issue in elections. Trump named him the head of his now defunct voter fraud commission.

A Senate primary in Tennessee is also becoming more contentious, as the Trump-endorsed candidate, former U.S. ambassador to Japan Bill Hagerty, went negative in his ads this week against his main competitor, Manny Sethi, an orthopedic surgeon whom Cruz endorsed on Wednesday.

The internal rancor this week was sharpest in the House Republican Conference and the attacks against Cheney, the scion of a prominent GOP family who is in position potentially to be the first female Republican speaker in history. The hostilities appeared to catch party leaders by surprise.

In the House Republican Conference’s first in-person meeting since the pandemic began, members of the House Freedom Caucus chastised Cheney for defending Anthony S. Fauci, the nation’s top infectious-disease specialist, whose blunt talk and high profile has undercut his standing somewhat in the White House. Cheney also was confronted with her criticism of key Trump foreign policy positions, most recently the administration’s plans to reduce the number of active-duty U.S. troops in Germany.

She also took a forceful position in favor of wearing face coverings to curb the spread of the novel coronavirus — something the president has been reluctant to do — tweeting a photo last month of her father, former vice president Richard B. Cheney, wearing a mask with the hashtag: “Realmenwearmasks.”

The president’s son Donald Trump Jr. joined Rep. Matt Gaetz (R-Fla.), a close ally of the president’s, in pushing to boot Cheney from her position as chair of the House Republican Conference while comparing her to Sen. Mitt Romney (R-Utah), the sole GOP senator who voted earlier this year to convict Trump on an abuse-of-power charge during his impeachment trial.

The White House did not respond to a request for comment Wednesday on whether the president agrees with his son that Cheney should be ousted from her leadership post.

On Thursday morning, the president weighed in.

“Liz Cheney is only upset because I have been actively getting our great and beautiful Country out of the ridiculous and costly Endless Wars,” he tweeted. “I am also making our so-called allies pay tens of billions of dollars in delinquent military costs. They must, at least, treat us fairly!!!”

Some House Republicans played down the internal dispute over Cheney as a one-time fracas.

“It’s gonna happen, unfortunately,” said Rep. Rodney Davis (R-Ill.). “But in the end, I think everybody has to come together this Congress, because you have to come together in a minority.”