WASHINGTON — Remember the infamous “Bridge to Nowhere”? The Montana Sheep Institute or the now-shuttered North Carolina teapot hall of fame?

Congress years ago eliminated funding for these types of pet projects, known as earmarks, after they became derided as government boondoggles, largess and a pathway to corruption.

President Trump now wants to bring them back.

In a freewheeling meeting about immigration with congressional Republicans and Democrats this week, Mr. Trump lamented the gridlock that has gripped the capital in recent years and suggested that earmarks, the practice of stealthily stuffing funding for pet projects into legislation, be exhumed from the legislative graveyard.

“Our system lends itself to not getting things done, and I hear so much about earmarks — the old earmark system — how there was a great friendliness when you had earmarks,” Mr. Trump said Tuesday. “Maybe all of you should start thinking about going back to a form of earmarks.”