WASHINGTON (Reuters) - President Donald Trump unexpectedly suggested on Tuesday that bringing back congressional “earmarks,” spending habits that were banished six years ago from the federal budget process, might help an often deadlocked U.S. Congress get things done.

Known by their supporters as the “grease” that made Washington’s wheels turn, earmarks were funds allocated for lawmakers’ pet projects that helped secure votes needed to get broader legislation passed.

“Maybe all of you should start thinking about going back to a form of earmarks,” Trump told lawmakers who were gathered at the White House for a meeting about immigration reform.

His surprise suggestion prompted Senator Lindsey Graham, a South Carolina Republican, to exclaim, “Yeah!,” while drawing objections and laughter from others in the room.

Congress resisted using earmarks routinely for decades, but they became commonplace in the 1990s and helped define Washington’s image as a “swamp” of special interests. As a 2016 presidential candidate, Trump made “Drain the Swamp” a campaign theme and popular slogan at his political rallies.

In the meeting on Tuesday, Trump lamented the animosity between Republicans and Democrats on Capitol Hill.

“This system really lends itself to not getting along. It lends itself to hostility and anger,” Trump said of the difficulties of passing legislation since the practice of allowing earmarks was abandoned.

Memorable examples of the use of earmarks were a “bridge to nowhere” in Alaska and the conviction of Republican Congressman Duke Cunningham of California for taking millions of dollars in bribes linked to special projects.

Since the practice was banished in 2011, Congress has struggled to carry out its basic job of writing and approving annual budgets.

“I hear so much about earmarks, the old earmark system, how there was a great friendliness when you had earmarks,” Trump said. “We have to put better controls because it got a little bit out of hand, but maybe that brings people together. Because our system right now, the way it’s set up, will never bring people together.”

Some members of Congress have also called for reviving earmarks, but Republican Representative Mark Walker from North Carolina, who chairs a large conservative faction of the House of Representatives, drew a firm line.

“I can tell you unequivocally most of us are going to have an issue with it,” he said. “I’m in favor of not bringing them back because of the temptation to abuse that process.”

Trump and congressional Republicans finished 2017 with a victory by passing a landmark tax overhaul bill against the united opposition of Democrats.

While Republicans have majorities in both houses of Congress, they will likely need Democrats’ votes to advance other goals this year given their narrow Senate majority.

The president has begun 2018 by seeking bipartisan support for immigration measures and some Democrats attended Tuesday’s meeting.

After the November 2018 congressional elections though, if Republicans lose seats in Congress as historically happens midway through the first term of a new president, Trump will need Democrats even more to follow through on his policy agenda.