President Donald Trump has fulfilled a key campaign pledge, announcing that the U.S. will withdraw from the Paris climate agreement.

The Paris Agreement, which committed the U.S. to drastically reducing greenhouse gas emissions, was a truly bad deal—bad for American taxpayers, American energy companies, and every single American who depends on affordable, reliable energy.

It was also bad for the countries that remain in the agreement. Here are four reasons Trump was right to withdraw.

1. The Paris Agreement was costly and ineffective.

The Paris Agreement is highly costly and would do close to nil to address climate change.

If carried out, the energy regulations agreed to in Paris by the Obama administration would kill hundreds of thousands of jobs, harm American manufacturing, and destroy $2.5 trillion in gross domestic product by the year 2035.

In withdrawing from the agreement, Trump removed a massive barrier to achieving the 3 percent economic growth rates America is accustomed to.

Simply rolling back the Paris regulations isn’t enough. The Paris Agreement would have extended long beyond the Trump administration, so remaining in the agreement would have kept the U.S. subject to its terms.

Those terms require countries to update their commitments every five years to make them more ambitious, starting in 2020. Staying in the agreement would have prevented the U.S. from backsliding or even maintaining the Obama administration’s initial commitment of cutting greenhouse gas emissions by 26 to 28 percent.

The Obama administration made clear in its commitment that these cuts were only incremental, leading up to an eventual 80 percent cut in the future.

In terms of climate benefits produced by Paris, there are practically none.

Even if every country met its commitments—a big “if” considering China has already underreported its carbon dioxide emissions, and there are no repercussions for failing to meet the pledges—the changes in the earth’s temperature would be almost undetectable.

2. The agreement wasted taxpayer money.

In climate negotiations leading up to the Paris conference, participants called for a Green Climate Fund that would collect $100 billion per year by 2020.

The goal of this fund would be to subsidize green energy and pay for other climate adaptation and mitigation programs in poorer nations—and to get buy-in (literally) from those poorer nations for the final Paris Agreement.

The Obama administration ended up shipping $1 billion in taxpayer dollars to this fund without authorization from Congress.

Some of the top recipients of these government-funded climate programs have in the past been some of the most corrupt, which means corrupt governments collect the funds, not those who actually need it.

No amount of transparency negotiated in the Paris Agreement is going to change this.

Free enterprise, the rule of law, and private property are the key ingredients for prosperity. These are the principles that actually will help people in developing countries prepare for and cope with a changing climate and natural disasters, whether or not they are caused by man-made greenhouse gas emissions.

3. Withdrawal is a demonstration of leadership.

The media is making a big to-do about the fact that the only countries not participating in the Paris Agreement are Syria and Nicaragua.

But that doesn’t change the fact that it’s still a bad deal. Misery loves company, including North Korea and Iran, who are signatories of the deal.

Some have argued that it is an embarrassment for the U.S. to cede leadership on global warming to countries like China. But to draw a moral equivalency between the U.S. and China on this issue is absurd.

China has serious air quality issues (not from carbon dioxide), and Beijing has repeatedly falsified its coal consumption and air monitoring data, even as it participated in the Paris Agreement. There is no environmental comparison between the U.S. and China.

Other countries have a multitude of security, economic, and diplomatic reasons to work with America to address issues of mutual concern. Withdrawal from the agreement will not change that.

Certainly, withdrawing from the Paris Agreement will be met with consternation from foreign leaders, as was the case when the U.S. withdrew from the Kyoto Protocol.

However, it could very well help future negotiations if other governments know that the U.S. is willing and able to resist diplomatic pressure in order to protect American interests.

4. Withdrawal is good for American energy competitiveness.

Some proponents of the Paris Agreement are saying that withdrawing presents a missed opportunity for energy companies. Others are saying that it doesn’t matter what Trump does because the momentum of green energy is too strong.

Neither argument is a compelling case for remaining in the agreement.

Whether it is conventional fuel companies or renewable ones, the best way for American energy companies to be competitive is to be innovative and competitive in the marketplace, not build their business models around international agreements.

There is nothing about leaving the agreement that prevents Americans from continuing to invest in new energy technologies.

The market for energy is $6 trillion and projected to grow by a third by 2040. Roughly 1.3 billion people do not yet have access to electricity, let alone reliable, affordable energy.

That’s a big market incentive for the private sector to pursue the next energy technology without the aid of taxpayer money.

The U.S. federal government and the international community should stop using other peoples’ money to subsidize energy technologies while regulating affordable, reliable energy sources out of existence.

The Paris Agreement was an open door for future U.S. administrations to regulate and spend hundreds of millions of dollars on international climate programs, just as the Obama administration did without any input from Congress.

Now, that door has thankfully been shut.