WASHINGTON — After public denunciations from watchdogs and criticism from President-elect Donald Trump, House Republicans on Tuesday reversed course and dropped plans to gut an independent agency that polices potential ethical wrongdoing by lawmakers.

The controversy over GOP plans to sharply curtail the powers of the Office of Congressional Ethics overshadowed the opening day of Congress, where Republicans control both chambers and soon will welcome a Republican president for the first time in eight years.

The about-face came a day after House Republicans met behind closed doors and moved to rein in the office, approved by Congress in 2008 as an independent arm to investigate lawmakers after scandals sent three lawmakers and high-flying lobbyist Jack Abramoff to prison.

"House Republicans made the right move in eliminating this amendment that should never have seen the light of day," said David Donnelly, president and CEO of Every Voice watchdog group, on Tuesday. "Not one voter went to the polls in November hoping Congress would gut ethics oversight."

The reversal came after Trump took to Twitter to slam the timing of House Republicans' move, saying lawmakers should focus on other priorities.

"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," the incoming president tweeted Tuesday morning.

"Focus on tax reform, healthcare and so many other things of far greater importance! #DTS," he added, using an abbreviation for one of his campaign mantras, "drain the swamp."

The plan to rein in the independent ethics body, known as OCE, was approved by House Republicans on Monday night and had been slated to go to the full House on Tuesday afternoon. The overhaul, crafted by House Judiciary Chairman Rep. Bob Goodlatte, R-Va., would have subjected the watchdog to oversight by the lawmaker-controlled House Ethics Committee and bar OCE from investigating anonymous complaints against House members.

It also sought to bar the ethics agency from reviewing potential criminal acts by members of Congress and instead would have required that it hand over those complaints to the House Ethics Committee or law enforcement.

Trump's objections to the House Republican action appeared to center more on timing of the move, rather than the substance of the decision to rein in the independent watchdog.

Asked whether Trump wanted House Republicans to strengthen the ethics office, Trump spokesman Sean Spicer told reporters Tuesday morning that “it’s not a question of strengthening or weakening.”

“It's a question of priorities” and Trump’s “belief that with all that this country wants … to have happen, this really shouldn't be the priority," Spicer said.

His comments came before House Republicans reversed course.