To understand the underlying issues, we should be thinking about justice — and about what’s really in our nation’s self-interest in a world of global competition.

Let’s start with some facts.

No one disagrees that some nations have contributed far more to the problem of climate change than others. Because of its greenhouse gas emissions, the United States wins the prize for all-time greatest contributor. The numbers are changing rapidly, but according to one estimate, the United States accounts for about 22 percent of the total, with China accounting for about 14 percent.

At the same time, China is, by far, the greatest current annual contributor, at around 30 percent. The United States is around 13 percent.

While no nation is immune from the risks of climate change, some nations, and some people, are far more vulnerable than others. Any particular estimate must be taken with many grains of salt, but according to one accounting, warming of 2.6 degrees Celsius would produce a reduction of 3.9 percent of gross domestic product in the United States — and 9.2 percent in South Africa.

People in poor nations, such as Pakistan, Nigeria, and Somalia, face greater risks than do people in wealthy nations, such as Canada, Switzerland, and Sweden. People in Chad and Ethiopia are much more vulnerable than are people in Germany, France, and Denmark.

The high-emitting countries have gained a lot from their emitting activities. In general, they face lower risks in the future. The highest risks are borne by low-income, low-emitting countries.

How should we think about that?

Let’s lay down a marker: If the people of one nation have imposed serious risks on the people of another nation, they have committed a wrong. They should not continue to do that — and they should help the people they have wronged.

President Trump is right to emphasize the importance of national boundaries. Public officials owe their jobs and their primary duties to their own people, not to the world.

Still, to do good, and more specifically to do what justice requires, wealthy countries ought to be helping poor countries and the vulnerable people who live there. And while much of the world’s focus has been on mitigation, a lot more attention needs to be devoted to resilience against the risks of flooding, extreme heat, drought, and wildfires.

Justice requires wealthy nations, and the businesses that help make them rich, to reduce the harms that they have caused.

So much for doing good; what about doing well? There are two reasons that it makes sense for the United States, focused on its self-interest, to help those who are most at risk.

The first reason is that ours is a deeply interconnected planet, even if we wish it were not. Harms in one place are tough to confine. The United States has people and assets all over the world. And if the last few years have taught us anything, it is that if people are desperate and fleeing from, say, South America, the immigration problem is going to get worse.

The second point involves soft power and reciprocity. The United States needs friends, and so do American companies. China and Russia are competing fiercely for allies, with both carrots and sticks. If the United States helps people in poor nations with respect to climate-related risks, there will be real dividends, certainly in the long-run and probably in the short-run, too.

Assistance in combating the risks of climate change is not a matter of foreign aid or charity. It is a matter of justice. And there is good news. Much of the time, those who act justly end up being rewarded for their efforts.

Cass R. Sunstein is a professor at Harvard Law School and author of “Climate Justice.”