Americans will be paying more for gas soon, courtesy of the United Nations. And that could make it harder for President Trump to remain president if higher costs lead to a weaker economy.

Four years ago, during the waning days of Barack Obama’s presidency, the U.N. International Maritime Organization decreed that oceangoing vessels such as container ships and tankers must use low-sulfur diesel to power their engines in order to cut their sulfur emissions almost fourfold from the currently allowable 3.5 percent to 0.5 percent by January 1, 2020.

That’s only about four months from now. Expect prices to rise … soon. And not just fuel prices, because just about everything made — or moved — is affected by fuel prices.

The “implications go beyond shipping and refining,” says Aftab Saleem of KPMG, which analyzes trends in energy markets. “Changes will be felt in the entire commodity landscape, including petrochemicals, road fuels and airlines.”

They’ve already been felt, giving us a prequel of what’s coming.

Low- and ultra-low sulfur diesel fuel has been mandatory in the United States for several years now, and while it has reduced sulfur emissions from diesel-powered passenger cars and trucks, it has also caused the price of diesel fuel to rise significantly.

Particularly in relation to gasoline. Which now costs less than diesel.

It used to be the opposite because diesel cost less to refine than gasoline. It was one notch up the distillation chain from crude oil. This made it attractive as the more economical fuel, especially important to over-the-road truckers but also to people looking to spend less to get around. Now, they spend more.

According to AAA, the average national price for a gallon of regular unleaded is $2.64 as of late August. But diesel goes for $3.28 per gallon, also according to AAA. That’s a 64 cents per gallon difference — a big difference — made more so because of compounding factors.

In addition to costing more to fuel, low-sulfur-burning diesel engines are less fuel-efficient to operate and more expensive to buy. The mileage advantage of a diesel engine vs. a gas engine used to be about 10 miles per gallon overall; this has decreased to almost negligible — about 5 mpg difference is now typical.

For example, the 2018 Dodge Ram 1500s available “EcoBoost” 3.0 liter turbo-diesel carries an EPA rating of 20 city, 27 highway (2WD models). The same truck with the 5.7 liter V8 gas engine gets 15 city, 22 highway. But the diesel V6 adds several thousand dollars more to the buy-in cost of the truck as well as 64 cents more per gallon every time you fill up.

In addition, modern diesels must have particulate traps and urea injection (a form of exhaust scrubbing) in order to achieve compliance with the low-sulfur emissions regs, adding another layer of cost.

All of these costs have conspired to make it much harder to justify buying diesel engines on economic grounds. Especially since the longevity grounds aren’t what they used to be. Low-sulfur diesel fuel, in addition to costing more, lacks the lubricating qualities that help diesel engines last a very long time relative to gas engines …

Or rather, used to.

Now they don’t. Engines need to be rebuilt — or replaced — more often than they used to. In addition to costing more than they used to. This has made over-the-road trucking more expensive. Which has made food and everything else transported by diesel-powered trucks more expensive.

Regulatory compliance costs caused one former manufacturer of roadgoing diesels — Caterpillar — to walk away from the market entirely. The company currently builds engines for off-road-use-only equipment, such as bulldozers.

For the same reasons, the United Nations’ ultra-low sulfur diesel fuel fatwa is going to make anything shipped more expensive, including goods from China, which will lose some of the advantages of lower manufacturing costs.

But with just four months to go before the fatwa goes into effect, only about 67 percent of the shipping industry is compliant, according to Bloomberg Intelligence. That’s roughly two-thirds of the approximately 90,000 oceangoing vessels that will be expected — required — to comply with the fatwa.

Which will be enforced by sniffer drones at ports, among other measures.

Some shippers may be able to get away with adding exhaust scrubbers, the diesel engine equivalent of catalytic converters. But many will be forced to replace perfectly sound (and paid-for) diesel engines with new “compliant” ones.

That’s going to get into money. And soon. Which could bring forth a recession, soon. And that could have political as well as economic repercussions.

“It’s interesting that in one of the smallest corners of the oil market — the bunker market — this one rule can have a ripple effect and cause a seismic shift in the shipping industry,” says ESAI oil market analyst Chris Cote.

That may be the understatement of the year … so far.