MARRAKESH, Morocco — Diplomats from around the world converged here this week with the plan to put details on last year’s Paris climate accord and move the globe closer to controlling the industrial emissions that are heating the planet.

Instead, with the election of Donald J. Trump — and his threat to withdraw the United States from the accord — shellshocked negotiators confronted potentially deep fissures developing in the international consensus on climate change. On the sidelines of the negotiations, some diplomats turned from talking of rising seas and climbing temperatures toward how to punish the United States if Mr. Trump follows through, possibly with a carbon-pollution tax on imports of American-made goods.

“A carbon tariff against the United States is an option for us,” Rodolfo Lacy Tamayo, Mexico’s under secretary for environmental policy and planning, said in an interview here. He added, “We will apply any kind of policy necessary to defend the quality of life for our people, to protect our environment and to protect our industries.”

Forcing United States industries to turn to cleaner energy sources with the hammer of an import tariff is not far-fetched. Countries imposing costs on their own industries to control carbon emissions could tell the World Trade Organization that United States industries are operating under an unfair trade advantage by avoiding any cost for their pollution.