When Democratic Gov. Jerry Brown and California legislative leaders needed a handful of votes last year to push a gasoline tax hike over the finish line, they turned to a well-tested, yet widely disparaged, tool: “earmarks” for wavering lawmakers’ pet projects.

They agreed to fund nearly $1 billion worth of special items, from $100 million for a University of California-Merced parkway project (to corral Democratic Assemblyman Adam Gray), to a $400 million extension of the Altamont Corridor Express commuter rail line (to win the support of Republican state Sen. Anthony Cannella).

Brown defended what he called the “arrangements” as a way to push through a much-needed increase in the gas tax, which is expected to raise $5.2 billion annually over 10 years for roads, bridges and other infrastructure.

“I don’t think I’ve ever seen anything as big as this particular transportation bill,” Brown told reporters after the late-night vote. “So I would say some of the arrangements that were entailed in this process, they may look large, but relative to $52 billion, it’s all pretty modest.”

The U.S. Congress placed a moratorium on the use of federal earmarks in 2011, hoping to curb wasteful spending. But in California and some other states, they never went away. Many state leaders argue that inserting money for local projects into broader bills isn’t wasteful — it’s an indispensable tool for winning votes. They say earmarks promote bipartisanship and break gridlock.

Now President Donald Trump and some lawmakers from both parties are calling for a revival of federal earmarks as a way to address the dysfunction in Washington. As Congress weighs the issue — it held hearings last month — the experience of states is instructive.

The California lawmakers who got money for projects in their districts defended the deals as beneficial to their constituents.

“This effort will certainly benefit the entire state by improving our dilapidated roadways, but my focus has always been ensuring my district is a participant in California’s growth,” Cannella said in a statement.

But critics, mostly opposed to raising the gas tax altogether, called the giveaways unseemly. A group of Republicans is currently mounting a petition drive to put a measure to scrap the gas tax hike on the November ballot.

A Big Mistake?

Congress stopped using earmarks following the disclosure of some especially egregious abuses. At the behest of Alaska lawmakers, for example, Congress in 2005 earmarked $223 million to link Ketchikan to the island of Gravina, home of only 50 souls, and already served by a ferry. Outrage over money spent on a Bridge to Nowhere ensued.

That was followed by the conviction of former U.S. Rep. Randy “Duke” Cunningham, a California Republican, who in 2006 was sent to prison for seven years for taking at least $2.4 million in bribes from defense contractors as payback for steering earmarks to their companies.

But in recent weeks Trump has repeatedly evoked a time when, thanks in part to earmarks, Congress had an easier time getting things done. “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,” he said in January.

“In the old days of earmarks … they went out to dinner at night and they all got along, and they passed bills,” Trump said. “A lot of the pros are saying that, if you want to get along and if you want to get this country really rolling again, you have to look at [earmarks].”

Some longtime Washington watchers agree.

“The whole focus on bashing earmarks has been a big mistake,” said Jonathan Rauch, senior fellow at the Brookings Institution. “Politics is about making deals, and making deals is difficult and complicated. Votes sometimes put [members] in trouble in their home districts. It’s very helpful to offer them some protection in the form of an earmark.”

Many lawmakers also miss the days of earmarks — but not all of them, including the Speaker of the House.

“Taxpayers were rightfully angered to learn of their hard-earned tax dollars squandered on the infamous Bridge to Nowhere in Alaska and the Rain Forest Museum in Iowa,” Republican Speaker Paul Ryan of Wisconsin says in a statement posted on his website. “More troubling than these egregious examples of waste is the corruptibility of the process.”

“Earmarks aren’t inherently problematic, but when former members of Congress are in jail for selling earmarks, there’s something seriously wrong with the process,” he wrote.

And shortly after Trump made his remarks, U.S. Sens. Jeff Flake, an Arizona Republican, and Claire McCaskill, a Missouri Democrat, introduced the “Earmark Elimination Act,” to further underscore their opposition and put the current, self-imposed ban by the House and Senate into law.

Good and Bad Earmarks

By definition, earmarks skirt the normal process through which legislatures pay for projects, said Gian-Claudia Sciara, an assistant professor at the University of Texas-Austin who has studied them. Sciara cites transportation projects as an example. In a perfect world, state or regional transportation authorities would perform a cost-benefit analysis on every proposed project and lawmakers would decide which ones to pay for. Such a system ensures that taxpayer dollars aren’t being wasted.

But circumventing the process doesn’t always produce bad results, Sciara said. “Some people would say the great thing about earmarks is that sometimes the projects we want aren’t in those state and regional plans.”

In some states — New York, New Mexico, North Carolina and Pennsylvania among them — capital spending bills routinely include the priorities of individual lawmakers, whether they have been requested by state agencies or not. Democratic Gov. Andrew Cuomo of New York came into office railing against the state’s “member item” system, which allowed projects to get funded without scrutiny. So in 2012, the State and Municipal Facilities Program was created, which was supposed to provide more oversight. Lawmakers still are allowed to sponsor projects, but state agencies must review them before any money is spent.

In North Carolina, the state’s $23 billion 2017 budget included $70 million in special earmarks, according to an analysis by The News & Observer. The earmarks include $830,000 for a new sewage system at an upscale golf community called River Landing owned by a hog-farming magnate who also made large political donations to legislators. All of the parties say the contributions had nothing to do with the funds and that the project was a worthy one.

Earmarks also persist in New Mexico.

Paul Gessing, president of the Rio Grande Foundation, an Albuquerque think tank espousing limited government, noted this year’s capital projects bill in New Mexico contains lots of bond issues and outlays for projects such as $14,100 for improvements to the Los Volcanes senior center in Albuquerque and $2 million for infrastructure improvements at Santa Fe community college. He has no quarrel with any of the projects individually, but with the process itself and what he says is a lack of oversight and vetting.

“These dollars are jealously guarded, especially in rural areas. For a lot of these legislators there’s not a heck of a lot going on in their districts,” Gessing said. “But obviously, more often than not, it tends to work for the benefit of narrow special interests and hurts John Q. Public.”

The same is true in Pennsylvania, according to Nate Benefield, vice president and chief operating officer of the Commonwealth Foundation, another free-market think tank. His group spotted $65 million in earmarks last year in the state’s “fiscal code” bill, which is part of the budget process. Pennsylvania went nearly a year without a budget, and funding in the fiscal code bill “helped solidify” some of the votes in the budget that eventually passed, he said.

“It’s hard to pinpoint exactly because sometimes the way they are written is so obscure,” he said. “But over the years a lot of these earmarks have been used to get members on board, as part of the budget process.”

For example, his group found that an earmark for $5 million for “a hospital in a city of the third class in a home rule county that was formerly a county of the second class A” was likely meant for Crozer-Keystone Health System in Chester City. And an earmark for $850,000 for “a special rehabilitation facility in Peer Group Number 13 in a city of the third class with a population between 115,000 and 120,000 based upon 2010 census data” was probably going to a facility in Allentown.

“That’s a bad way of appropriating funds,” Benefield said. “We only really have a chance to analyze what’s in these bills long after they pass.”