Republican leaders' open defiance last week of the FBI over the release of a hotly disputed memo revealed how the GOP, which has long positioned itself as the party of law and order, has become an adversary of federal law enforcement as the party continues its quest to protect President Trump from the Russia investigation.

The FBI, the Justice Department and other agencies are now under concerted assault by Republicans, facing allegations of corruption and conspiracy that have quickly moved from the fringes of the right into the mainstream of the GOP.

Republicans in Congress insist that their efforts are meant to fulfill their duty to provide oversight of the executive branch and root out suspected bias. But critics say their campaign — to "cleanse" the FBI, in the words of House Speaker Paul D. Ryan (R-Wis.) — has been clearly orchestrated to safeguard the president and undercut the Russia probe, which includes an examination of whether Trump or his associates have sought to obstruct justice.

Deputy Attorney General Rod J. Rosenstein has been the target of President Trump's ire for months. Here's a look back at their history. (Jenny Starrs, Monica Akhtar/The Washington Post)

"It's an extraordinary moment," said Steve Schmidt, a strategist on George W. Bush's and John McCain's presidential campaigns who opposes Trump. "The party has become completely unmoored from things that it held as close to sacred until very recently, including a fidelity to the country's security institutions."

The GOP offensive has raised doubts among millions of Americans about the independence and integrity of federal law enforcement agencies, which have not been caught in a political maelstrom of this magnitude since the Watergate scandal almost five decades ago.

Tensions reached a boil this week when Trump approved the publication of the then-classified memo, which was authored by Republicans on the House Intelligence Committee chaired by Devin Nunes (R-Calif.), one of the president's most loyal allies. The release came despite intense opposition from law enforcement and intelligence officials, who said that the document was full of errors and omissions and that disclosing it was "extraordinarily reckless" to national security.

The memo alleges that senior FBI and Justice officials abused their power and used a contested dossier on Trump to secure a warrant from a foreign-intelligence court to wiretap Carter Page, a former Trump campaign adviser.

The president claimed Saturday on Twitter that "this memo totally vindicates 'Trump' in probe. But the Russian Witch Hunt goes on and on . . . This is an American disgrace!"

The FBI, Democrats and some Republicans expressed alarm following days of unsuccessful appeals to Trump and Ryan to halt the release of a memo they say is incomplete and deeply misleading — and that they say sets a dangerous precedent.

The document is part of long-standing efforts by Trump to influence or derail the Russia probe, including his firing in the spring of FBI Director James B. Comey; his abandoned order in the summer to get rid of special counsel Robert S. Mueller III; and his continued consideration behind the scenes of removing others including Deputy Attorney General Rod J. Rosenstein, who has ultimate authority over the investigation. Trump has told advisers in recent days that he was hopeful the memo's release would pave the way for further shake-ups at Justice, including the firing of Rosenstein.

Confidence in the FBI has simultaneously declined among Republican voters. A Gallup survey in December 2017 found that 49 percent of Republicans thought the FBI was doing an "excellent" or "good" job, down from 62 percent in 2014. Among Democrats, 69 percent approved of the FBI's performance, up from 60 percent in 2014.

Amid the tumult, rank-and-file conservatives and a chorus of Trump boosters in the media plunged ahead with the onslaught.

"We take no joy in this," said Rep. Matt Gaetz (R-Fla.), who advocated the memo's release and has suggested top law enforcement leaders be jailed for their alleged misdeeds. "We didn't weave into the [party] platform last time that we are now against DOJ and the FBI. We'd rather be trashing Obamacare than trashing the FBI. But we have a job to do."

But with Republicans fearful of a shellacking in fall's midterm elections, vulnerable House incumbents are growing concerned that their party's positioning carries unpredictable risks.

Rep. Brian Fitzpatrick (R-Pa.), a freshman representing suburban Philadelphia and a former FBI agent, said he is "telling my colleagues to be very careful on how they proceed here." But he acknowledges that his voice alone will not suddenly turn around the party's message.

"There are unfortunately some people who are trying to judge an entire institution by a few bad actors," Fitzpatrick said. "The FBI is an amazing organization that I love with all my heart, and we need to balance our calls for transparency with the need for confidentiality in covert operations."

Former New York mayor Rudolph W. Giuliani, a Trump ally and onetime prosecutor who is close to some FBI officials, said his party "must be careful."

"Republicans could be clearer, whether these issues turn out to be legitimate or not, that their focus is on the leadership at the time of the FBI — not the agents," Giuliani said. "There are tremendous worries about conduct that deserve attention, but make sure to stay on that."

Most striking to some Republicans has been the conduct of Ryan, who is widely respected within the party and casts himself as a pillar of traditional conservatism.

While Ryan has maintained that Mueller's investigation should continue on its course, he has strongly supported Nunes and questioned whether civil liberties were violated. Addressing the Nunes memo, Ryan told a small gathering of television anchors this week, "Let it all out, get it all out there. Cleanse the organization," according to Fox News. The speaker added, "I think we should disclose all this stuff. It's the best disinfectant."

On Friday, shortly after the document was declassified, Ryan said he was "glad" — although he cautioned his party in a statement to "not use this memo to impugn the integrity of the justice system."

Ryan's approach reflects much of the GOP leadership in Congress, which has labored to assure conservative hard-liners like Gaetz that their grievances about the FBI are being heard.

Senate Majority Leader Mitch McConnell (R-Ky.) has had little to say about the House memo, other than to tell reporters he thinks Ryan is "handling this just right."

Only a few elected Republicans have spoken negatively about the memo's release. Sen. John Thune (R-S.D.), a member of the Senate leadership, said Nunes should have shared it first with Senate Intelligence Committee Chairman Richard Burr (R-N.C.) and incorporated the concerns of FBI Director Christopher A. Wray. Sens. McCain and Jeff Flake, Arizona Republicans who have been critical of Trump, both opposed making the document public.

"If we continue to undermine our own rule of law, we are doing [Russian President Vladimir] Putin's job for him," McCain said in a statement Friday.

Mark Salter, a longtime McCain confidant and adviser, said the GOP has largely reached a stage "where nothing is more important than politics — everything is tribal, about winning."

Republicans have clashed with federal law enforcement agencies before, particularly under Democratic presidents, from the FBI's 1993 siege of a religious group's compound in Waco, Tex., to an uproar during President Barack Obama's first term over a firearms sting operation dubbed "Fast and Furious."

The recent, more expansive GOP distrust can be traced back to the 2016 campaign. Giuliani recalls traveling with Trump and together grousing about Comey and then-attorney general Loretta E. Lynch, among others, whom they saw as unfairly sympathetic to Hillary Clinton, the Democratic nominee who was under FBI investigation for her use of a private email server while she was secretary of state.

"I still don't know how the hell she got away with it," Giuliani said. "She was treated extraordinarily by Jim Comey and the FBI. At least, that was my impression."

The perception of bias was fueled by media commentary on the right, including on Fox News, and a series of incidents that provided fodder to partisans, such as Lynch's private meeting with former president Bill Clinton on an airport tarmac in Phoenix.

"This has all been building for a while," said Rep. Peter T. King (R-N.Y.), a member of the House Intelligence Committee with deep ties to law enforcement. "You go back to 2016, there were serious errors made by certain people in the FBI and at Justice. Lynch on the tarmac, Comey deciding to not prosecute Hillary, and we still don't have the full story of what happened that October."

The upheaval over the memo comes amid an emerging power shift in the party that is tilting the GOP toward skepticism: Libertarian-leaning Republicans averse to expanding U.S. warrantless surveillance programs are increasingly vocal and winning converts.

Sen. Rand Paul (R-Ky.) and Rep. Thomas Massie (R-Ky.) have established themselves as leaders of the bloc, as other players on the right have embraced WikiLeaks and groups that have argued for dismantling what some Trump supporters call "the deep state," a conspiratorial reference to the intelligence community and law enforcement as entrenched actors with self-interested motives.

Trump has encouraged that perspective even as he has formally supported a bill to expand surveillance powers, tweeting inaccurately and without evidence about being wiretapped by the Obama administration. In January, a measure to scale back surveillance powers was defeated in the House, although 58 Republicans joined 125 Democrats in supporting it.

At the center of this week's eruption over declassifying the Nunes document has been a group of about 70 House members who have been rallying to "release the memo" during closed Republican conference meetings and on social media. They also have been speaking to talk radio and conservative websites with fierce criticism of Rosenstein, Wray and Attorney General Jeff Sessions, among others.

GOP pollster Frank Luntz, who is close with party leaders, explained the dynamic: "An average Republican voter's inclination is to trust law and order. If the police say they're guilty, a Republican assumes they are . . . But because so much of life has been politicized, you have this crosscurrent of an internal desire to support these institutions and the feeling that the people who occupy them are not doing their jobs correctly."

Schmidt had a less charitable explanation, citing a list of conspiratorial beliefs that have been taken up over the years by the far right.

"It represents the mainstreaming of a strain of conservatism that comes from a place of paranoia and conspiracy," Schmidt said. Many Republican leaders, he argued, "are now the equivalent of the Lyndon LaRouche people in the parking lot of the supermarket handing out fliers shouting conspiracies."

Among Democrats, there is unease about the GOP's turn, as well as lingering concerns of their own.

Many Clinton supporters continue to believe the FBI improperly handled her probe and blame Comey's late October 2016 letter to Congress reopening the email investigation for her loss.

Lanny J. Davis, a longtime member of Clinton's political orbit, is publishing a book on Tuesday titled, "The Unmaking of the President 2016: How FBI Director James Comey Cost Hillary Clinton the presidency."

The headline for Davis's column in The Hill newspaper this week: "Deep state existed in '16 — but it elected Trump."

Scott Clement contributed to this report.