WASHINGTON (AP) — By claiming a right to Syria’s oil, President Donald Trump has added more complexity — and U.S. forces — to an American military mission he has twice declared he was ending so the troops could come home.

Extending the mission to secure eastern Syria’s oilfields happens to fit neatly with the Pentagon’s view — supported by some Trump allies in Congress — that a full withdrawal could hasten a revival of the Islamic State group, even after the extremists lost their leader, Abu Bakr al-Baghdadi, in a recent U.S. raid.

The military acknowledged on Thursday that an Army unit with armored vehicles, including Bradley infantry carriers, is operating in the Deir el-Zour oil region. It did not say how many soldiers are being added there, but officials have said the eventual force there likely will be about 500, including roughly 200 who had been there even before Trump was persuaded to revise his plan for a near-total withdrawal, which he announced on Oct. 14.

Trump has offered varying descriptions of the military’s role in eastern Syria. On Oct. 25 he said, “We’ve secured the oil, and, therefore, a small number of U.S. troops will remain in the area where they have the oil.” Three days later, he went further, declaring the oil to be America’s.

“We’re keeping the oil — remember that,” he said in Chicago. “I’ve always said that: ‘Keep the oil.’ We want to keep the oil. Forty-five million dollars a month? Keep the oil.”

White House officials since then have declined to explain what Trump meant by “we’re keeping the oil” or his estimate of its value. Pentagon officials have said privately they’ve been given no order to take ownership of any element of Syria’s oil resources, including the wells and stored crude.

Defense Secretary Mark Esper said Thursday he interprets Trump’s remarks about keeping Syria’s oil as meaning that extremists must be denied access to it.

Syria has been mired in civil war since 2011. Since that time, its oil production has shrunk from a peak of about 400,000 barrels a day to an estimated 80,000 barrels, said Jim Krane, an energy expert at Rice University.

Russia expressed outrage at Trump’s claim to the oil, calling it “state banditry.” Foreign Ministry spokesman Maj. Gen. Igor Konashenkov said grabbing the oil belies U.S. claims to be fighting terrorism and “lies far from the ideals that Washington has proclaimed.”

For years the United States has said its military interventions abroad are meant to enhanced peace and security, not to take any nation’s territory or resources.

Stephen Vladeck, a national security law professor at the University of Texas at Austin, said there is no solid legal argument the Trump administration can make for claiming Syria’s oil.

Beyond the legal question, analysts say the mission is fraught with danger.

“This is a sensitive gunpowder barrel of a mission,” said Loren DeJonge Schulman, deputy director of studies at the Center for a New American Security, who was a senior Pentagon and White House official under President Barack Obama.

“U.S. forces are being sent with only the shakiest possible legal authorization, knowing their commander in chief may change his mind as he has multiple times in the past,” she said, adding that an oil grab is what many in the Middle East have long suspected is the purpose of U.S. wars.

Trump also has said he wants a U.S. oil company to enter eastern Syria to invest in restoring oil production. Private experts, however, say that is problematic.

“The modest size of the resource, risk of conflict, and legal obstacles to investment from U.S. sanctions make it unlikely that a U.S. oil major would find it commercially attractive to invest in the Syrian oil sector,” said Jason Bordoff, director of an energy policy center at Columbia University.

“Syria could be a bigger energy supplier than today, but years of mismanagement have left the fields in disarray, so it would require a lot of political stability and investment to bring them back to where they were,” said Michael Webber, a professor of energy resources at the University of Texas at Austin.

Esper has said that securing the Deir el-Zour oilfields is a legitimate move to block a major source of income for the Islamic State and to provide funds for the Syrian Kurds who are still fighting ISIS. A few years ago, the extremists were exploiting the oil to finance its so-called caliphate, carved out of large swaths of Syria and Iraq with an army now all but extinguished.

In 2015-16 the U.S. military carried out an air campaign — dubbed Operation Tidal Wave II, after a World War II operation against oil facilities in Romania — that destroyed tanker trucks used by the extremists to transport oil for black market sales and damaged many oil facilities.

“We weren’t going after the militants at all; we were going after the money, and by blowing them up we actually weakened them significantly,” said Katherine Zimmerman, a counterterrorism expert at the American Enterprise Institute.

“Denying them access to resources like the oil is a way that we’re going to need to fight them,” she added.

Since then, U.S.-supported Syrian Kurdish forces have controlled the oil, supported by a small contingent of U.S. troops. A quiet arrangement has existed between the Kurds and the Syrian government, whereby Damascus buys the surplus through middlemen in a smuggling operation that has continued despite political differences. The Kurdish-led administration sells crude oil to private refiners, who use primitive homemade refineries to process fuel and diesel and sell it back to the Syrian administration.

The oil was expected to be a bargaining chip for the Kurds to negotiate a deal with the Syrian government, which unsuccessfully tried to reach the oilfields to retake them from ISIS.

Esper told reporters the mission in Deir el-Zour includes blocking potential Russian and Syrian army efforts to probe that region, east of the Euphrates River, and challenge the American presence. A few days earlier, U.S. officials had contacted Russian authorities to question a massing of Syrian and Russian forces on the opposite side of the Euphrates — a buildup that made possible a potential confrontation. In February 2018 a group of several hundred Russian mercenaries fired artillery near U.S. forces in the oil region, and the Americans responded by killing many of them.

Trump himself has acknowledged the potential for a fight over the oil.

“We’re leaving soldiers to secure the oil,” he said Sunday. “And we may have to fight for the oil. It’s OK. Maybe somebody else wants the oil, in which case they have a hell of a fight.”