With President Trump’s decision just days away, the Paris climate accord appears to be in jeopardy as officials inside the White House and powerful conservatives outside government capture momentum by seizing on thorny legal questions that would arise from keeping the deal while the administration simultaneously guts the regulations needed to help the U.S. meet its promise.

Mr. Trump has said he will make a decision on whether to remain a part the agreement in the next two weeks. A tug of war within the administration over the past months now seems to be turning in favor of the “leave” camp, led by EPA Administrator Scott Pruitt, White House adviser Steve Bannon and others.

Specialists say there are numerous reasons why Mr. Trump may ultimately conclude that exiting Paris — one of the Obama administration’s landmark international achievements that called on the U.S. to cut its greenhouse gas emissions by at least 26 percent by 2025 — is the right thing to do from a political and economic perspective, including potential legal problems that would stem from staying. In addition, Mr. Trump vowed during his campaign to exit.

“First, those who wish to exit are in harmony with an explicit campaign promise. Those who want to stay are contrary to that promise. Second, the agreement poses some legal risk,” said Michael McKenna, a Republican strategist who worked on Mr. Trump’s transition team. “Third, those who want to stay are arguing specifically to allow international bureaucrats to have some say over American energy production and use. That’s ridiculous.”

The legal question seems to be at the center of the debate. White House counsel Donald McGahn reportedly has advised the president that remaining in the Paris deal may make it difficult to reverse Obama-era regulations on power plant emissions — known as the Clean Power Plan — and fuel economy standards.

Those regulations are central to meeting the Paris pledge, and a court could require them to go forward if the U.S. sticks by its international promise, formally known as the nationally determined contribution.

Environmental groups surely would sue to keep the Clean Power Plan and other regulations in place if the White House voluntarily stands by its Paris commitment.

Some administration officials, including Secretary of State Rex W. Tillerson and Energy Secretary Rick Perry, argue that the U.S. should remain a part of the accord but renegotiate the terms, possibly reducing the emissions target figures to ease the economic impact while maintaining a seat at the table.

But that also seems legally problematic.

The text of the Paris deal clearly states that a country can adjust its commitment, but such an adjustment must be more ambitious. That means the U.S. would have to commit to even greater emissions reductions, which would be impossible to achieve given the White House’s deregulatory tack.

State Department attorneys reportedly argue that the deal, along with U.S. law, would allow for a renegotiation, but analysts say their points are flawed.

“The argument that we can simply renegotiate the Paris Climate Treaty is false. That’s not an option under the deal. The agreement’s language in Article 4 is clear and deliberate. According to this treaty, any revision must be more stringent. We cannot revise downward, and we are required to make it worse every five years — forever. This is a truly terrible deal for U.S. consumers and the economy,” said Chris Horner, a senior fellow at the conservative Competitive Enterprise Institute and a vocal opponent of the agreement. “The Paris treaty is ‘politically binding,’ like prior climate treaties, but carries huge potential legal consequences, and the State Department is misleading the White House by ignoring these risks. If President Trump stays in this treaty and follows through in his energy agenda, every climate activist state attorney general, environmental group and the entire climate industry will surely litigate on the basis of the Paris treaty.”

Perhaps sensing that defeat is near, supporters of the Paris agreement on Wednesday sent a letter urging the president to remain. In their letter, 12 Democratic governors — including California’s Jerry Brown and New York’s Andrew Cuomo — argued that the U.S. must lead the world on climate change.

“Under the Paris Agreement, all the world’s major economies are taking action on climate change for the first time, including China and India, which have put forward their own commitments to cut their carbon pollution domestically,” they said. “If the U.S. does not maintain global climate leadership through national policies to reduce greenhouse gas emissions and transition to clean energy, China and India will. This would be a huge lost opportunity, putting us at a competitive disadvantage” compared with other nations.

Business leaders from companies such as Apple, Microsoft and General Mills made a similar case in their own letter to the president last week.

The White House also is coming under international pressure. Under President Obama, the U.S. was able to persuade China to agree to its first-ever emissions reductions and join the Paris accord.

A U.S. exit could lead other nations to renege, causing the entire agreement to unravel.

“We all continue to hope the U.S. will find a way to remain within the Paris Agreement,” European Union Climate Commissioner Miguel Arias Canete has said.