A day of pageantry to open the 115th Congress and usher in a new period of Republican governance was overtaken Tuesday by an embarrassing reversal on ethics oversight, with the GOP gripped by internal division and many lawmakers seeking to shield themselves from extensive scrutiny.

The 19 hours of tumult was set in motion the night before behind closed doors at the Longworth House Office Building, where Republican lawmakers decided over the objections of Speaker Paul D. Ryan (R-Wis.) to amend House rules to effectively gut the independent Office of Congressional Ethics.

They awoke Tuesday to an intense public outcry. Social media lit up with criticism of representatives trying to rein in the ethics office created a decade ago in the aftermath of scandals. Angry constituents inundated their representatives’ offices with calls of protest. Journalists peppered lawmakers with questions. The halls of the Capitol felt chaotic.

Then, shortly after 10 a.m., came the loudest objection of all: A pair of tweets from President-elect Donald Trump scolding Congress for making the weakening of the ethics watchdog its “number one act and priority.” He punctuated his second tweet with the hashtag “DTS” — shorthand for “drain the swamp,” one of his campaign-trail mantras.

With Washington’s latest power dynamics in their nascent state, Tuesday’s events illustrated the weight of Trump’s voice in discussions on Capitol Hill. The president-elect’s tweets hovered over everything and helped turn what might otherwise have been an insider-driven rule change into a national ruckus over government ethics.

(Peter Stevenson/The Washington Post)

[House Republicans vote to rein in independent ethics office]

The events were fast-moving Tuesday morning. As Trump was using his political capital on Congress, Republican House leaders were meeting in Ryan’s office contemplating just how the day had gotten away from them — and what they might do to salvage it. Ryan would soon be sworn in for another term as speaker, and his wife and children, dressed up for the occasion, lingered outside.

House Majority Leader Kevin McCarthy (R-Calif.) told the leaders that the rules legislation with the ethics amendment would have trouble getting the 218 votes needed to pass — and they decided it must be scrapped.

The leaders called an emergency meeting of Republican House members in the Capitol basement. McCarthy pointedly asked the members whether they had campaigned last fall on decimating the ethics office — or on repealing President Obama’s health-care law and changing the tax code.

The windowless room fell silent, according to several lawmakers in attendance. McCarthy gave them an ultimatum: Reverse course now, among fellow Republicans, or take a public floor vote. He asked for unanimous consent to remove the rules change — and shortly after noon, he got it. The push to amend ethics rules was now dead, or at least fast asleep.

“I can tell you the calls we’ve gotten in my district office and here in Washington surprised me, meaning the numbers of calls. People are just sick and tired,” Rep. Walter B. Jones (R-N.C.) said of the simmering outrage over the proposed change. “People are just losing confidence in the lack of ethics and honesty in Washington.”

For the lawmakers who had supported the rules change, the OCE had become an unaccountable office with little transparency. Rep. Peter J. Roskam (R-Ill.), who was the subject of an OCE referral over a 2011 trip he took with his wife to Taiwan, likened the office to Old English royal courts that dictated harsh and arbitrary sentences to powerful figures.

1 of 17 Full Screen Autoplay Close Skip Ad × Congress convenes for opening session of 2017 View Photos The 115th Congress was gaveled into session. The House convened at noon Tuesday, with 241 Republicans and 194 Democrats. Among the members are 52 freshmen. Caption The 115th Congress was gaveled into session. The House convened at noon Tuesday, with 241 Republicans and 194 Democrats. Among the members are 52 freshmen. Jan. 3, 2017 Newly reelected House speaker Paul D. Ryan (R-Wis.) gavels in the opening session of Congress. Matt McClain/The Washington Post Buy Photo Wait 1 second to continue.

“It’s a star chamber,” said Roskam, who was cleared by the Ethics Committee in 2013. “It needs to be reformed.”

House Republicans have not abandoned an OCE overhaul entirely, but any changes are being put off until later in the year.

Tuesday’s actions disrupted a day of ceremonial rituals, as Ryan was easily reelected as speaker with the support of all but one Republican — far fewer defectors than when he first won the speakership in 2015. Most Democrats voted for Rep. Nancy Pelosi (D-Calif.), who will remain the minority leader.

Members of the new House and Senate were sworn in throughout the afternoon. Republicans will hold a 52-48 advantage over Democrats in the Senate, and 241-194 in the House.

Delivering his inaugural floor speech as Senate minority leader, Charles E. Schumer (D-N.Y.) vowed to fight Trump on issues where Democrats disagree.

“It is not our job to be a rubber stamp,” Schumer said. “It is our job to do what’s best for the American people, the middle class and those struggling to get there.”

But in a sign of his party’s diminished influence, Schumer spoke to a mostly empty chamber save for several dozen of his Democratic colleagues. Sens. Jeff Sessions (R-Ala.) and Ted Cruz (R-Tex.) stood on the floor whispering to each other, ignoring Schumer.

[Here are the eight Trump Cabinet picks Democrats plan to target]

The House rules package that ultimately passed Tuesday contained a controversial provision that will impose fines on members using electronic devices to take photographs, record audio or video or conduct live streams on the House floor. The provision came in response to House Democrats staging a sit-in last summer aimed at forcing votes on gun control legislation.

At issue earlier in the day were changes to the Office of Congressional Ethics, which was created in 2008 following the Jack Abramoff lobbying scandal to address concerns that members of the House Ethics Committee had been too timid in pursuing allegations of wrongdoing by fellow lawmakers.

The amendment, proposed by Judiciary Committee Chairman Bob Goodlatte (R-Va.), would have renamed the office as the Office of Congressional Complaint Review and prevented it from investigating anonymous tips or referring criminal wrongdoing to prosecutors without the express consent of the Ethics Committee. It also would have prohibited the office from employing staff to communicate with the public or the media.

House leaders knew days in advance of Monday night’s meeting of Republican lawmakers to finalize the House rules package that Goodlatte would seek to undermine the independent ethics office.

The leadership made an effort to head off the proposal before the meeting, but Goodlatte refused to budge.

As the meeting started at 5:30 p.m., aides were confident that members would reject Goodlatte’s proposal once Ryan and McCarthy weighed in against it. That did not happen. Goodlatte was backed by a chorus of rank-and-file lawmakers — many of whom had been targeted by OCE probes or feared they might be next — who were emboldened to make changes. The measure passed handily, 119 to 74. Dozens of other members were absent because they were not yet in Washington.

Rep. Trent Franks (R-Ariz.) echoed the views of many colleagues in saying changes to the OCE were long overdue. “There’s no due process,” he said. “An anonymous source can destroy your life, put you on the front page of the newspaper — and when it’s too late, you’re completely exonerated. I’ve watched that happen to close friends who were straight as an arrow.”

[Donald Trump, meet your toughest hurdle: the U.S. Senate]

Others foresaw the political toll that could be exacted for a decision to make gutting ethics oversight the first act of the new Congress. “I had cautioned some of my colleagues last night that that one provision would create quite a public stir — and it did,” Rep. Charlie Dent (R-Pa.) said with a slight chuckle.

Ryan and McCarthy initially seemed resigned to accepting the will of their members, even though they understood the less-than-optimal message it sent to voters nationally, especially following an campaign during which Washington was vilified.

Before GOP members could meet to change course, McCarthy had to face a conference room full of skeptical reporters. “We’re a collective group of individuals,” he said. “Sometimes you win, sometimes you lose.”

The development blindsided Trump transition officials, prompting Ryan staffers to explain to Trump aides late Monday night and into Tuesday morning what exactly House members had voted on and why they did it.

Early Tuesday, one of Trump’s top advisers, Kellyanne Conway, partially defended the proposed changes to the ethics office in an appearance on MSNBC. But that was before she discussed the matter with the president-elect, and a few hours later it became clear he disagreed with what House Republicans had done.

“With all that Congress has to work on, do they really have to make the weakening of the Independent Ethics Watchdog, as unfair as it . . . may be, their number one act and priority. Focus on tax reform, health care and so many other things of far greater importance!” Trump wrote on Twitter Tuesday morning.

Trump spokesman Sean Spicer said the president-elect was not taking a position on the merits of the ethics rules changes, only on the prioritization.

“It’s not a question of strengthening or weakening,” Spicer told reporters. “I think it’s a question of priorities and the president’s belief that with all that this country wants and needs to have happen, this really shouldn’t be the priority.”

Ryan and Trump eventually spoke by phone following the conference meeting and during the vote for speaker, per aides.

But earlier, as Trump was firing off tweets, McCarthy reflected on the discord that had engulfed Congress’s first day. During the morning news conference, McCarthy was flung questions from journalists — including one about whether the day’s events signaled weakness on the part of House leaders.

“Man,” McCarthy replied, “welcome back.”

Read more at PowerPost

Sean Sullivan, Paul Kane, Ed O’Keefe, David Weigel, Kelsey Snell, Scott Higham and Karoun Demirjian contributed to this report.