House Speaker Paul D. Ryan (R-Wis.) smiles as he arrives for a caucus meeting with his fellow House Republicans at the U.S. Capitol on Nov. 15, 2016. On Wednesday, he moved to delay an effort to partially restore appropriations earmarks after a six-year ban. (Reuters/Jonathan Ernst)

President-elect Donald Trump is coming to Washington promising to “drain the swamp,” but House Republicans came very close Wednesday to reinstating one of Capitol Hill’s swampiest institutions: the appropriations earmark.

A ban on lawmakers using spending bills to fund specific pet projects has been in place since 2010, when scandals over congressional abuses led to an end to the practice. Those scandals included former Rep. Randy “Duke” Cunningham’s prosecution on corruption charges and the infamous $400 million “Bridge to Nowhere” favored by Alaskan lawmakers.

But four GOP lawmakers proposed changing internal party rules this week, allowing members to direct spending in limited cases for projects involving the Department of Defense, the Army Corps of Engineers, the Department of Homeland Security and select other agencies. The earmarks would be fully disclosed to the public and could not increase spending, only redirect it.

The sponsors of the earmark amendment, which was offered in a closed-door meeting of House Republicans on Wednesday, called it an effort to reclaim Congress’s power of the purse from the executive branch. Other earmark proponents favor them as legislative grease that can help build support for bills that members might otherwise oppose on an ideological basis.

“It’s a conservative, constitutional way to resolve this,” said Rep. John Abney Culberson (R-Tex.), chairman of an Appropriations subcommittee and an author of the amendment. “We’ve eliminated all the abuses in the past.”

But the proposal to restore earmarks generated immediate and fierce opposition from conservative groups, including the Club for Growth and Heritage Action for America. Sen. Jeff Flake (R-Ariz.), who battled earmarks as a House member for more than a decade, said Tuesday that his fellow Republicans were “pushing to reopen the favor factory.”

“Congress should instead immediately pass legislation to make the ban on earmarks a permanent statutory prohibition,” Flake said. “After all, you can’t drain the swamp by feeding the alligators pork.”

But according to several House Republicans, there was widespread support in the closed-door meeting for the change, and it was left to none other than House Speaker Paul D. Ryan to stand up and speak out against quickly adding it to the party rules.

Ryan noted, according to one person in the room, that after a “drain the swamp” election, Republicans “cannot turn right around and bring back earmarks behind closed doors.”

But the idea is not dead. Instead, it has been kicked to a GOP task force that will look at the issue and report back early next year with a revised proposal that will go to the House floor, Culberson said.

“We had a tremendous amount of support for the amendment,” he said. “Any concerns that were raised were about timing. . . . Speaker Ryan gave us his word that this would be a process that would include everyone and would ensure that our hard-earned tax dollars are spent in a way that is transparent, open, accountable and in accordance with the Constitution.”