WASHINGTON (AP) — There wasn't a dramatic public break or an exact moment it happened. But step by step, Senate Republicans are turning their backs on President Donald Trump.

They defeated an Obamacare repeal bill despite Trump's pleas. They're ignoring his Twitter demands that they get back to work on the repeal measure. They dissed the White House budget director, defended the attorney general against the president's attacks and passed veto-proof sanctions on Russia over his administration's objections.

They're reasserting their independence, which looked sorely diminished in the aftermath of Trump's surprise election win.

"We work for the American people," Sen. Tim Scott of South Carolina said Tuesday. "We don't work for the president."

Those are surprisingly tough words from a Republican whose state Trump won easily less than a year ago. But after six months of controversies and historically low approval ratings, it's clear Trump isn't commanding the fear or respect he once did.

Some Republicans no doubt are giving voice to long-held reservations about a man whose election was essentially a hostile takeover of their party. But it is notable that the loudest criticism is coming from the Senate, where few Republicans are burdened with facing an electorate anytime soon. The situation is different in the House, where most Republicans represent conservative districts still loyal to Trump. For those lawmakers, the fear of facing a conservative primary challenger, possibly fueled by angry Trump followers, is real.

In the most remarkable example of public Trump-bashing, Sen. Jeff Flake of Arizona is taking aim at the president and his own party in a new book, writing that "unnerving silence in the face of an erratic executive branch is an abdication" and marveling at "the strange specter of an American president's seeming affection for strongmen and authoritarians."

The criticism from Flake is especially striking since he is one of just two GOP senators facing competitive re-election races in next year's midterm elections, the other being Dean Heller of Nevada. The other 50 Senate Republicans are largely insulated from blowback from Trump's still-loyal base, at least in the short term, since many of them won't face voters for several years.

That is likely contributing to their defiance, which is emerging now after an accumulation of frustrations, culminating in the failure of the health care bill Friday. In particular, senators were aghast over Trump's recent attacks on their longtime colleague Jeff Sessions, the former Alabama senator who is now attorney general and facing Trump's wrath over having recused himself from the investigation into possible collaboration between Russia and Trump's presidential campaign.

Sen. Lindsey Graham of South Carolina deemed Trump's treatment of Sessions "unseemly" and "a sign of great weakness on the part of President Trump." The comments were echoed by other Republican senators.

Then, White House budget director Mick Mulvaney, a former House member, suggested on a Sunday show that the Senate must pass health care before doing anything else. No. 2 Republican John Cornyn didn't hesitate to go after him.

"I don't think he's got much experience in the Senate as I recall, and he's got a big job," Cornyn said. "He ought to do that job and let us do our jobs."

The ill will flows both ways. At Tuesday's White House briefing, press secretary Sarah Huckabee Sanders pointedly blamed lawmakers for the president's failures to deliver. "I think what's hurting the legislative agenda is Congress' inability to get things passed," she said.

Trump has been ignoring past warnings from Majority Leader Mitch McConnell to stay out of the Senate's business, tweeting relentless commands in the wake of Friday's failure on health care that the Senate should eliminate the filibuster rule that requires 60 votes to move forward on much major legislation.

"Mitch M, go to 51 Votes NOW and WIN. IT'S TIME!" the president said over Twitter.

That ignored the fact that Republicans tried to pass the health care bill under rules that required only a simple majority.

So Republicans, in turn, ignored Trump.

"It's pretty obvious that our problem on health care was not the Democrats," McConnell said drily on Tuesday. "We didn't have 50 Republicans."

Some Republicans say Trump and his administration only made it harder to pass health care by ineptly pressuring Sen. Lisa Murkowski with threats from Interior Secretary Ryan Zinke about consequences for her state, which rankled the Alaska senator. She proceeded to postpone votes in the Energy committee she chairs on a group of administration nominees, while saying it was for unrelated reasons, and voted "no" on the health bill.

"I think most Republican senators have their own identity that's separate from the president," said Alex Conant, a GOP strategist and former adviser to Sen. Marco Rubio of Florida. "If you look at the elections last fall, almost every Republican senator who was up for re-election ran ahead of Trump and that's not a fact that's lost on Congress."

The House has been a friendlier place for Trump. Republicans there pushed through a health care bill in May.

"For the most part our caucus is still in support of the president," said Rep. James Comer of Kentucky. "That doesn't mean we agree with everything he says and does, but we still support his agenda, his presidency, and we're not going to fumble the ball."

In the Senate, though, lawmakers and the president appear to be going their separate ways, with some senators talking as though Trump is almost irrelevant.

"Ever since we've been here we've really been following our lead, right?" said Sen. Bob Corker of Tennessee. "Whether it was the Supreme Court justice or the Russia sanctions bill, attempting to do health care and obviously we did so unsuccessfully, and now we're moving on to tax reform, but most of this has, almost every bit of this has been 100 percent internal to Congress."

___

Associated Press writers Kevin Freking, Matthew Daly and Jill Colvin contributed.