The relationship between President Trump and Senate Republicans has deteriorated so sharply in recent days that some are openly defying his directives, bringing long-simmering tensions to a boil as the GOP labors to reorient its stalled legislative agenda.

Sen. Lamar Alexander (R-Tenn.), head of the Senate Health, Education, Labor and Pensions Committee, announced Tuesday that he would work with his Democratic colleagues to “stabilize and strengthen” the individual insurance market under the Affordable Care Act, which the president has badgered the Senate to keep trying to repeal. Alexander also urged the White House to keep up payments to insurers that help low-income consumers afford plans, which Trump has threatened to cut off.

Several Republican senators have sought to distance themselves from the president, who has belittled them as looking like “fools” and tried to strong-arm their agenda and browbeat them into changing a venerated rule to make it easier to ram through legislation along party lines.

Some are describing the dynamic in cold, transactional terms, speaking of Trump as more of a supporting actor than the marquee leader of the Republican Party. If he can help advance their plans, then great, they say. If not, so be it.

“We work for the American people. We don’t work for the president,” Sen. Tim Scott (R-S.C.) said. He added, “We should do what’s good for the administration as long as that does not in any way, shape or form make it harder on the American people.”

(Jesse Mesner-Hage,Dalton Bennett,Meg Kelly/The Washington Post)

The friction underscores the challenge Republicans face headed into the fall. As they seek to move beyond a failed health-care effort in pursuit of an elusive, first big legislative win, the same infighting that has plagued them all year threatens to stall their push to rewrite the nation’s tax laws, which Senate Majority Leader Mitch McConnell (R-Ky.) said Tuesday he wants to do beginning in September and finish by year’s end.

While some Republicans try to tune out what they see as distracting and sometimes destructive rhetoric and action from Trump, they recognize that they cannot fully disavow him without also dashing their hopes of implementing the conservative policies they championed in the campaign.

For many Republican senators, the challenge is trying to walk an increasingly fine line.

As public opinion polls show a decline in Trump’s approval rating, some Republican senators have sought to address difficult questions about what the president’s diminishing popularity means for his mandate by insisting that congressional Republicans, not Trump, are the ones driving the GOP agenda.

“Ever since we’ve been here, we’ve really been following our lead,” said Sen. Bob Corker (R-Tenn.). After ticking through major Republican initiatives so far, he added, “Almost every bit of this has been 100 percent internal to Congress.”

1 of 83 Full Screen Autoplay Close Skip Ad × A look at the second half, so far, of President Trump’s first year in office View Photos Scenes from the Republican’s second six months in the White House. Caption A look at the second half of the president’s first year in the White House. Jan. 24, 2018 President Trump speaks to a group of mayors in the East Room of the White House. Jabin Botsford/The Washington Post Buy Photo Wait 1 second to continue.

Senate GOP leaders have openly flouted Trump’s attempts to steer them back to repealing and replacing the ACA, an endeavor that collapsed in failure last week. On Tuesday, McConnell laid out the rest of the Senate’s plans before adjourning for the summer recess. Health care was not among them.

Instead, Alexander signaled he would go around the president. He and Sen. Patty Murray (D-Wash.) announced they would hold fall hearings to shore up the individual health insurance markets. It was the most concrete sign yet of bipartisan work in the Senate on strengthening the existing health-care law, and it followed a proposal offered Monday by a bipartisan group of 43 House members.

Trump, who installed John F. Kelly as his new chief of staff a day earlier, on Tuesday was noticeably tame toward fellow Republicans on Twitter. But White House press secretary Sarah Huckabee Sanders blamed the GOP-controlled Congress for the lack of major accomplishments this year.

“I think what’s hurting the legislative agenda is Congress’s inability to get things passed,” she said Tuesday.

Trump had spent the preceding few days in an antagonistic posture.

He used his favorite social media platform to push Senate Republicans to end the 60-vote threshold for most legislation, writing: “Republicans in the Senate will NEVER win if they don’t go to a 51 vote majority NOW. They look like fools and are just wasting time.” He also demanded they vote again on health care, despite an inability to round up enough votes for a far narrower bill than they had long promised.

By Tuesday, it was wearing thin on Capitol Hill.

Sen. Orrin G. Hatch (R-Utah) said that if the rules were changed as Trump wants, “it would be the end of the Republican Party. And it would be the end of the Senate.” Trump’s repeated insistence “doesn’t help,” Hatch said. “But he just doesn’t understand that.”

McConnell was able to muster only 49 votes for his health-care bill. Under special rules he was using, it would have passed with 50 — and a tiebreaking vote by Vice President Pence. Ending the 60-vote threshold as Trump has demanded would not have changed the outcome — a point McConnell was quick to bring up Tuesday.

“It’s pretty obvious that our problem on health care was not the Democrats. We didn’t have 50 Republicans,” he told reporters. He added, more forcefully, “There are not the votes in the Senate, as I’ve said repeatedly to the president and to all of you, to change the rules of the Senate.”

The concerns about the 45th president extend beyond arguments over how the Senate conducts its business, to his discipline, strategy and core values. Such concerns often are expressed in private, but one Republican senator, Jeff Flake of Arizona, has laid them out in lacerating fashion in his recently published book, “Conscience of a Conservative.”

“In the tweeting life of our president, strategy is difficult to detect,” Flake writes. “Influencing the news cycles seems to be the principal goal; achieving short-term tactical advantage, you bet. But ultimately, it’s all noise and no signal. . . . We have quite enough volatile actors to deal with internationally as it is without becoming one of them.”

Flake argues that the “Faustian bargain” that conservatives made in embracing Trump has “put at risk our institutions and our values” and that “the strange specter of an American president’s seeming affection for strongmen and authoritarians . . . is almost impossible to believe.”

Asked about a Washington Post report that Trump dictated his eldest son’s misleading statement about meeting with a Russian lawyer, Sen. Lindsey O. Graham (R-S.C.) replied: “I don’t know if it’s true or not. But the statement was misleading. And when you have a misleading statement, it just continues to breed distrust, so that means the investigation continues.”

Trump’s criticism of Attorney General Jeff Sessions, a former senator, has also irked Republicans in the chamber. The president’s threats against GOP senators during the health-care debate, including Sens. Dean Heller (R-Nev.) and Lisa Murkowski (R-Alaska), also rubbed many the wrong way.

Some said Tuesday they were hopeful that Trump’s staff shake-up would produce better results.

“I’m very pleased that [former communications director Anthony] Scaramucci is gone and that General Kelly, I believe, will bring a sense of order and discipline that is needed,” said Sen. Susan Collins (R-Maine).

Sanders said Tuesday that Kelly has “spoken to a number of members of Congress,” a sign that relations could improve.

Graham, who has been one of the most outspoken Republican critics of Trump, laid out his thinking on the president. Increasingly, his colleagues are sounding more like him in their willingness to offer curt assessments.

“I ran out of adjectives, and I voted for a guy I never met,” Graham said. “What was that guy’s name? Evan?”

Evan McMullin, reporters reminded him, mentioning the independent 2016 candidate’s full name.

“President Trump won. I respect his victory. I want to help him with health care and do other things that I think we can do together like cut taxes,” Graham said. “I’ll push back against ideas I think are bad for the country, like changing the rules of the Senate. And that’s the way I’m going to engage the president.”

James Hohmann contributed to this report.