By Alexander Burns and Jonathan Martin

The relationship between President Donald Trump and Sen. Mitch McConnell, the majority leader, has disintegrated to the point that they have not spoken to each other in weeks, and McConnell has privately expressed uncertainty that Trump will be able to salvage his administration after a series of summer crises.

What was once an uneasy governing alliance has curdled into a feud of mutual resentment and sometimes outright hostility, complicated by the position of McConnell’s wife, Elaine L. Chao, in

Trump’s Cabinet, according to more than a dozen people briefed on their imperiled partnership. Angry phone calls and private badmouthing have devolved into open conflict, with the president threatening to oppose Republican senators who cross him, and McConnell mobilizing to their defense.

The rupture between Trump and McConnell comes at a highly perilous moment for Republicans, who face a number of urgent deadlines when they return to Washington next month. Congress must approve new spending measures and raise the statutory limit on government borrowing within weeks of reconvening, and Republicans are hoping to push through an elaborate rewrite of the federal tax code. There is scant room for legislative error on any front.

A protracted government shutdown or a default on sovereign debt could be disastrous — for the economy and for the party that controls the White House and both chambers of Congress.

Yet Trump and McConnell are locked in a political cold war. Neither man would comment for this story. Don Stewart, a spokesman for McConnell, noted that the senator and the president had “shared goals,” and pointed to “tax reform, infrastructure, funding the government, not defaulting on the debt, passing the defense authorization bill.”

Still, the back-and-forth has been dramatic.

In a series of tweets this month, Trump criticized McConnell publicly, then berated him in a phone call that quickly devolved into a profane shouting match.

During the call, which Trump initiated Aug. 9 from his New Jersey golf club, the president accused McConnell of bungling the health care issue. He was even more animated about what he intimated was the Senate leader’s refusal to protect him from investigations of Russian interference in the 2016 election, according to Republicans briefed on the conversation.

McConnell has fumed over Trump’s regular threats against fellow Republicans and criticism of Senate rules, and questioned Trump’s understanding of the presidency in a public speech. McConnell has made sharper comments in private, describing Trump as entirely unwilling to learn the basics of governing.

In offhand remarks, McConnell has expressed a sense of bewilderment about where Trump’s presidency may be headed, and has mused about whether Trump will be in a position to lead the Republican Party into next year’s elections and beyond, according to people who have spoken to him directly.

While maintaining a pose of public reserve, McConnell expressed horror to advisers last week after Trump’s comments equating white supremacists in Charlottesville, Virginia, with protesters who rallied against them. Trump’s most explosive remarks came at a news conference in Manhattan, where he stood beside Chao. (Chao, deflecting a question about the tensions between her husband and the president she serves, told reporters, “I stand by my man — both of them.)

McConnell signaled to business leaders that he was deeply uncomfortable with Trump’s comments: Several who resigned advisory roles in the Trump administration contacted McConnell’s office after the fact, and were told that McConnell fully understood their choices, three people briefed on the conversations said.

Trump has also continued to badger and threaten McConnell’s Senate colleagues, including Sen. Jeff Flake of Arizona, whose Republican primary challenger was praised by Trump on Twitter last week.

“Great to see that Dr. Kelli Ward is running against Flake Jeff Flake, who is WEAK on borders, crime and a non-factor in Senate. He’s toxic!”

Trump was set to hold a campaign rally Tuesday night in Phoenix, and Republicans feared he would use the event to savage Flake again.

If he does, senior Republican officials said the party’s senators would stand up for their colleague. A Republican “super PAC” aligned with McConnell released a web ad on Tuesday assailing Flake’s Republican rival, Kelli Ward, as a fringe-dwelling conspiracy theorist.

“When it comes to the Senate, there’s an Article 5 understanding: An attack against one is an attack against all,” said Sen. Lindsey Graham, R-S.C., who has found himself in Trump’s sights many times, invoking the NATO alliance’s mutual defense doctrine.

There are few recent precedents for the rift. The last time a president turned on a legislative leader of his own party was in 2002, when allies of George W. Bush helped force Trent Lott to step down as Senate minority leader after racially charged remarks at a birthday party for Sen. Strom Thurmond, R-S.C.

For the moment, McConnell appears to be far more secure in his position, and perhaps immune to coercion from the White House. Republicans are unlikely to lose control of the Senate in 2018, and Trump has no allies in the Senate who have shown an appetite for combat with McConnell.

Still, some allies of Trump on the right — including Stephen K. Bannon, who stepped down last week as Trump’s chief strategist — welcome more direct conflict with McConnell and congressional Republicans.

Roger J. Stone Jr., a Republican strategist who has advised Trump for decades, said the president needed to “take a scalp” in order to force cooperation from Republican elites who have resisted his agenda. Stone urged Trump to make an example of one or more Republicans, like Flake, who have refused to give full support to his administration.

“The president should start bumping off incumbent Republican members of Congress in primaries,” Stone said. “If he did that, Mitch McConnell and Paul Ryan would wet their pants and the rest of the Republicans would get in line.”

But McConnell’s allies warn that the president should be wary of doing anything that could jeopardize the Senate Republican majority.

“The quickest way for him to get impeached is for Trump to knock off Jeff Flake and Dean Heller and be faced with a Democrat-led Senate,” said Billy Piper, a lobbyist and former McConnell chief of staff.