The Republican Party is imploding four weeks before Election Day, and Donald Trump is reveling in it.

In the wake of GOP leaders and lawmakers severing ties with him, Donald Trump declared war on the party he will represent on the ticket in November, slamming House Speaker Paul Ryan as “weak and ineffective” and essentially encouraging his backers to reject the candidates down the ballot who don’t support him. This approach, combined with elements of his debate performance in St. Louis, raises questions about his commitment to winning the presidency and puts the party in free fall.

“The shots of the civil war have been fired, and the smoke won’t clear for a very long time,” said one state GOP chair.

Out of the ashes, the question is who, then, is the leader of the Republican Party?

The three main players are Trump, the party’s presidential nominee; Ryan, the highest-elected Republican in the land; and Reince Priebus, chairman of the Republican National Committee. But differing reactions within the party to Ryan’s actions, Priebus’s decisions and Trump’s transgressions suggest anything but a consensus now or after the election.

Trump hinted at further turmoil in a tweet:

It is so nice that the shackles have been taken off me and I can now fight for America the way I want to. — Donald J. Trump (@realDonaldTrump) October 11, 2016

Trump has vowed he won’t be “shackled” by anyone or anything, though some in his campaign and in the party have attempted at points to rein him in. His path to the nomination was built, in large part, on his opposition to the status quo in his party and a pledge to rattle Washington. He ran as a Republican but not one beholden to it. And he stands apart from his party on several key issues, including trade and foreign policy.

Last week, when several influential members of the party faithful dropped their support of Trump after the revelation of his lewd comments on NBC’s “Access Hollywood,” Trump wore it as a badge of honor.

But some support may come trickling back. Nebraska Sen. Deb Fischer said on Tuesday she would vote for Trump after all, despite withdrawing her support a few days earlier.

Feeling liberated, Trump has focused his ire this week on Ryan. “Paul Ryan is open borders, and amnesty, and bad budgets—very, very bad budgets,” he said during an interview with Bill O’Reilly on Fox News Tuesday night. "I wouldn’t want to be in a foxhole with a lot of these people, including Ryan — especially Ryan.”

Ryan has long been a loyal member of the GOP and has been focused on policy and expanding his party’s reach. He remained neutral throughout the primaries and instead set his sights on crafting a governing agenda for the party that outlines its principles.

The Wisconsin lawmaker withheld his endorsement when Trump effectively clinched the nomination this spring, but eventually backed him in June. Since then, he has found himself repudiating more than defending Trump and has not appeared on the campaign trail with him. If Trump loses and Democrats take over the Senate, Ryan would be the top Republican in Washington. He is intensely focused on keeping his party’s hold on congressional power.

He has told fellow lawmakers to “do what’s best for you in your district” and still has strong support in the lower chamber.

Ryan’s fellow Wisconsinite, Priebus, is focused on cheerleading for the party and driving turnout up and down the ballot. The party chair is a key face of the GOP. He is in constant communication with Trump and sometimes travels with him. He has seldom condemned Trump for fear of driving away support for the party, but he made an exception over the weekend after audio was released of the “Access Hollywood” comments.

Priebus has kept in touch with party members and state chairs monitoring the fallout of the Trump tape and has remained committed to supporting the business mogul as the nominee. At this point, he seems unlikely to divert resources away from the presidential race to focus on the down-ballot contests.

“We’re often decentralized,” said Matt Schlapp, chairman of the American Conservative Union. “But it might be the first time ever that activists across the country are playing a bigger role than any elected official.”

The leadership question may not be answered until after voters go to the polls on Nov. 8. The shifting tide of this election is also shifting who the party turns to in time of need.

Republicans opposing Trump see Ryan, not the current nominee, as the standard-bearer.

“With Paul Ryan as the Republican speaker of the House, and somebody who has put out a very serious series of policy proposals, it’s very clear he’s the leader of the party,” said Doug Heye, a strategist and veteran of the RNC and Capitol Hill. “Donald Trump isn’t a Republican. We now see the speaker of the House and elected officials being attacked by a Hillary Clinton donor and supporter.”

But Trump’s attacks on Ryan excite members of his base, many of whom dislike the GOP perhaps more than they do Clinton. Indeed, Trump supporters have hit back at the House speaker and other party lawmakers and officials for abandoning the nominee, even though Ryan did not rescind his support of Trump. In their view, Ryan and anyone who opposes Trump is to blame for GOP disunity.

“They deserve it. They betrayed the Republican voters in the primaries,” tweeted California Rep. Dana Rohrabacher about the targets of Trump’s criticism, including Ryan. “Donald Trump is the one who’s under attack here. ... This is them attacking Don Trump and him hitting back, and I think that’s what the American people, why they like him as much as they do, is [because] he’s willing to punch somebody in the nose who’s been kicking him in the shins."

Even vice presidential candidate Mike Pence, a former congressman and a friend of Ryan’s, did not come to his defense. “Paul Ryan is my friend, but yeah, I respectfully disagree with his focus in this campaign,” he told NBC News.

On Monday, Ryan announced he would no longer defend Trump and would instead focus his energy entirely on preserving the party’s majority in the House. The speaker has not withdrawn his endorsement of Trump, mindful that doing so could further alienate Republican voters from party candidates in particular districts.

Priebus has perhaps the toughest balancing act of all — defending Trump while not hurting his candidates down the ballot. He reminds members that nearly three-quarters of party voters don’t want the GOP to sever ties with Trump, according to polling. There is also a concern such a split would depress Republican turnout across the country and down the ballot. Priebus has been consulting with RNC members and state party chairs about the course forward and announced Monday the party would stick by Trump.

Diana Orrock, a Republican National Committeewoman in Nevada, said she wouldn’t support any candidates in her state who withdraw from Trump, including Senate hopeful Joe Heck. “We’ve been admonished all our lives as Republicans, especially going into a general election, that you get on board and you vote for all the Republicans up and down the ticket, and get as many Republicans as you can in office,” she told CNBC. “And now we are going to hold their feet to the fire with that very same advice.”

That sentiment gives Trump some leverage, even though he is dependent upon the RNC and state parties for voter engagement and turnout operations in key battleground states. While he didn’t call out Priebus or the RNC on Twitter this week, he has accused Republicans of being disloyal: “With the exception of cheating Bernie out of the nom the Dems have always proven to be far more loyal to each other than the Republicans!”

Trump has also signaled he will go after any Republican who crosses him.

The very foul mouthed Sen. John McCain begged for my support during his primary (I gave, he won), then dropped me over locker room remarks! — Donald J. Trump (@realDonaldTrump) October 11, 2016

McCain, the 2008 nominee whose war record Trump criticized, said over the weekend he would not vote for his party’s standard-bearer in November. Earlier this year, Trump openly toyed with not endorsing McCain or Ryan in their respective congressional primaries.

“Republicans kicked dirt in his eyes and he kicked back,” said Schlapp. “He’s running against Washington. He’s running against Congress. And that’s a popular fight.”

Trump’s “unshackling” isn’t limited to fighting his own party. His central target remains Clinton. Trump believes he energized Republicans during the debate by attacking Clinton on a variety of vulnerable issues. But he is also going after her in ways GOP strategists and party members believe will further alienate him from a broader swath of voters.

During rallies in Pennsylvania this week, Trump applauded chants of “lock her up” and continues to call for his opponent to be prosecuted. On Tuesday, he released an ad questioning Clinton’s health and stamina, featuring video footage of her coughing and stumbling to her car last month.

“Clearly, Trump’s campaign believes the way to win is to galvanize the far right,” said the state GOP chair. “But that has never been a proven strategy to win a presidential election.”

James Arkin contributed to this report.