The Trump administration has outraged environmentalists for (at least of late) threatening to end the $7,500 tax credit for electric vehicles in retaliation for GM’s decision to shutter five plants and lay off 15 percent of its workers.

That announcement is consistent with other administration policies regarding climate change: Earlier this year it announced its intent to delay the implementation of the steep improvements in the Corporate Average Fuel Economy standards originally set forth by the Obama administration. Several lawsuits have already been filed to stop the implementation delay, and it may take the court years to adjudicate the dispute.

However, both EV subsidies and CAFE standards are incredibly inefficient and costly ways to reduce greenhouse gas emissions. Congress should acquiesce with ending both programs—and replace them with a modest carbon tax that achieves a similar diminution of carbon emissions.

Congress originally enacted fuel efficiency standards in the aftermath of the 1970s energy crisis, when a Saudi-led oil embargo resulted in oil prices tripling almost overnight. Its main intent was not to improve the environment but to lessen dependency on overseas oil.

The government’s original strategy to deal with higher oil prices was to impose price ceilings, which (predictably) resulted in long lines at stations and nationwide gas shortages and were wildly unpopular. So it mandated that cars get better gas mileage instead.

Just like with price ceilings, however, the fuel efficiency standards also came with inadvertent outcomes that mitigated much of the anticipated gains. Its biggest problem is that CAFE standards significantly increase the cost of a new car—by as much as $3,000, studies suggest.

If new cars cost more, people postpone buying new cars and hold onto their older, more polluting cars. The average age of a car on the highway today is nearly twelve years, an increase of two full years just in the last decade. The potential environmental improvements from greater fuel efficiency in new cars is dampened by the fact that they make up a smaller proportion of the U.S. fleet.

What’s more, economists observe that people who own more fuel-efficient cars tend to drive them more, since it is cheaper to do so, which further reduces fuel savings from higher fuel efficiency standards.

It is worth noting that at the time that the Obama administration implemented the 2020-2022 statutory increases in CAFE standards, which would hike fuel efficiency standards to much as 55 miles per gallon, many experts doubted that it was feasible for domestic car companies to to achieve these standards. Recent studies (including some done by the federal government) have confirmed the technical difficulties inherent in such an large jump and suggested that they be modified.

While CAFE standards are ineffective at reducing gas consumption, they are an even worse way to achieve greenhouse gas reductions, which is the motivation for the 2020-2022 increases. They were never designed for this purpose, but it represented one of the few ways for the Obama administration to reduce greenhouse gas emissions without the acquiescence of Congress.

The case for continuing the subsidy for electric vehicles is even weaker: The primary motivation for beginning this program was to help U.S. companies competing against foreign rivals to ensure that the U.S. industry remained dominant in this new market. Today, with Tesla dominating the market and high tech companies like Apple, Dyson and Ampl providing billions of dollars of investment and intellectual firepower. No one believes that this market would significantly diminish if the electric-car tax credit disappeared.

Fortunately, there is a better way to reduce greenhouse gas emissions: A study I wrote with my colleague David Kemp finds that we could save billions of dollars for U.S. drivers while achieving higher emission reductions if we simply scrapped CAFE standards altogether and implemented a modest carbon tax instead. While conservatives reflexively oppose all tax increases, such a step would be much more cost-effective and it could either be combined with an offsetting reduction of other taxes on low-income households. Or, if Congress is serious about fully funding any new infrastructure program, the resulting revenue could be devoted to increased infrastructure spending.

Mandating a specific technological change almost invariably results in a less than ideal outcome, especially if the mandate in question was not originally conceived as a way to achieve a particular goal. The best way to get less of something we don’t want is always to tax it more.