WASHINGTON — After years of public vilification, lawmakers from both parties are contemplating a return to the practice of using earmarks in federal spending bills after the midterm elections.

Big changes are on the horizon in the House and the circumstances could be ripe for a resurrection of the once-common tool of dispensing money to individual members to benefit their home districts, often in return for votes on broader legislation.

House Speaker Paul Ryan is leaving Congress, creating a new battle for GOP leadership. Changes in Democratic leadership, or at least challenges to it, are likely as well. In addition, there will be a number of members who will be leaving after the post-election, lame-duck session. President Donald Trump has also advocated a return of earmarks, and many rank-and-file members are frustrated by an inability to tout legislative accomplishments to their constituents.

Ryan, who has been opposed to earmarks in the past, appears more open to the idea now. He said in his weekly news conference on Thursday that it is something the conference will likely "wrestle with" after the midterms. And Democratic leaders have outlined their own proposal to bring earmarks back.

Long before Trump started using the term "drain the swamp," Congress rid itself of earmarks in 2011, when they were derided as one of the most corrupting influences in politics and lawmaking.

Now, nearly eight years later, a Congress that has struggled to pass individual funding bills filled with members who have little to tout in their districts is considering bringing back a reformed version of the legislative tool.

Proponents say it would encourage bipartisanship, transfer power from the executive branch to the legislative arm and potentially save money.

Rep. Tom Cole, R-Okla., chairman of a House appropriations subcommittee, is a proponent of a modified version of directed spending, calling it a "no-brainer."

He said in a telephone interview there will be "a healthy debate" about it but the idea is "moving in the right direction."

While conservatives acknowledge that the concept is becoming more popular, especially among rank-and-file Republicans, they are vowing to fight it.

"It exemplifies the worst part of Washington," said Alexei Woltornist, communications director for Rep. Mark Walker, R-N.C., chairman of the conservative Republican Study Committee.

One reason the idea is gaining traction is because of turnover in the House in recent years. Woltornist notes that 40 percent of current members of the House have been elected since the earmark ban, so have no experience of them being commonplace and an object of derision.

Opponents say earmarks would further bloat the federal budget and bring back the worst type of pay-to-play politics that have become synonymous with lobbying scandals and "pork-barrel spending."

"The challenge is, when we had it before, it was a corrupt system. Duke Cunningham went to jail because of earmark abuse," Ryan said, referring to a California Republican who resigned from the House in 2005 in a bribery scandal. "So my experience with earmarks was abuse of process."

But Ryan added that there is a compelling separation of power argument. "It really does at the end of the day come down to fiscal conservatism, transparency and what is the proper role of the government and the role between the executive and legislative branch," Ryan added.

Proponents, however, aren’t advocating for the blanket return of earmarks, which were often dropped into a bill unannounced late in the process, but a modified version that would require more transparency and oversight, including posting them online with the name of the member who requested it.

One proposal suggests a two-step authentication process, which would require earmarks to be authorized and appropriated, an idea intended to prevent last-minute insertions of pet projects to reward campaign donors or lobbyists.

Advocates argue that the elected officials in the legislative branch, whose job it is to appropriate government money, should be the ones tasked with directing where it ends up. Without earmarks, the money is sent to federal agencies, which then decide how to spend it. Cole says earmarks would also help ease the passage of major legislation because members might be more willing to support such measures if they can give constituents a victory.

"Earmarks wouldn't be a panacea for partisanship, but it would help," Cole said.

The growth of earmarks in the early 2000s that went toward wasteful projects such as the infamous "bridge to nowhere," and were increasingly used to buy votes from rank-and-file members, turned the spending tool into a rallying cry for small-government activists.

The rise of the Tea Party in 2010 fueled the public’s fury. Still, congressional leaders, especially Senate Republican Leader Mitch McConnell and then-Senate Democratic Leader Harry Reid, resisted ridding the Congress of the tool.

But when President Barack Obama called for its elimination in his State of the Union address in 2011, Congress acted, instituting a temporary ban that has stayed in place since.

Republicans have been contemplating the return of earmarks for the past two years. At a conference meeting just days after the 2016 election, Republican members discussed the idea. Ultimately, Speaker Ryan prevented the vote from moving forward, telling his conference that they just had a “drain the swamp” election and could not turn around and immediately bring earmarks back behind closed doors.

The House Rules Committee held a hearing on the idea in early 2018 with members of both parties advocating for the return of earmarks.

Rep. Steny Hoyer of Maryland, the No. 2 Democrat in the House, has been working with Republicans and Democrats to reinstate them, according to a Hoyer aide.

Conservatives worry that the instability of leadership in both parties after the election will spur a move toward bringing back earmarks by giving those running for leadership positions to use the idea to curry favor with members to obtain votes, and to centralize their power.

“The only people who truly benefit from the return of earmarks are the very top tier of congressional leadership, who would have unlimited discretion to fund their own parochial projects, as well as the ability to use the promise of funding — or the threat of defunding — to coerce members into voting for bills they might otherwise oppose,” Rachel Bovard, senior director of policy at Conservative Partnership.

Andy Roth, vice president of public affairs at the Club for Growth, said that earmarks are a losing issue in the minds of voters.

“If Republicans attempt to bring them back, they will become the official Swamp Party in the minds of voters. No issue could cause Republicans to lose the House faster than restoring earmarks. Any member of Congress who is suggesting that earmarks should return is only looking to pad their own campaign accounts and get re-elected,” Roth said.

Trump, however, advocated the idea himself, telling senators in a closed-door session, “Maybe all of you should start thinking about going back to a form of earmarks.”