As the fallout from an attack on Saudi oil facilities draws the United States deeper into regional tensions, President Donald Trump treads a fine line. Despite the U.S. having no international obligation to get involved, Trump has adopted the posture of a strong ally to the Saudis. But even a limited U.S. strike in retaliation could risk armed conflict with Iran — at a time when neither Americans nor the White House want another military engagement in the Middle East.

Two air attacks on Sept. 14 against Saudi facilities knocked out half of the country’s oil capacity and rocketed U.S. oil prices. Yemen’s Houthi rebels immediately claimed responsibility for the attacks. The assault, for which Iran denies involvement, triggered Trump to say the U.S. is “locked and loaded” to respond.

Though Saudi Arabia is still conducting an investigation into the attacks, both the Saudis and the Americans have said that they are convinced that it came from the Iranians. Defense Secretary Mark Esper on Friday evening announced that in response to the attacks and as a “first step,” the president has approved the deployment of U.S. forces for defensive purposes. Esper said the troops would be sent to Saudi Arabia and the United Arab Emirates, and though there were no specifics on the number of troops, Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff, said it is “not thousands.”

Already at odds over sanctions and the breakdown of the nuclear agreement, the attack over the weekend further escalates tensions between the U.S. and Iran. Secretary of State Mike Pompeo, who was in Saudi Arabia this week, called the attacks “an act of war” that was on a “scale we’ve not seen before.”

Iranian Foreign Minister Javad Zarif on Friday tweeted, “Iran has no desire for war, but we will, and always have, defend our people and our nation.”

Despite the heated language, the U.S. does not have any legal or treaty obligation to act in defense of Saudi Arabia.

Trump on Friday announced another round of sanctions on Iran, claiming “these are the highest sanctions ever imposed on a country. We’ve never done it to this level.”

But compared to his initial tough reaction to the attacks, he took a striking change of tone, on Friday saying, “I think the strong person’s approach and the thing that does show strength would be showing a little bit of restraint.”

And yet, the attacks may still present an opportunity for Saudi Arabia to get the U.S. involved in their contest with Iran.

“The Saudis would like the Americans to fight Iran for them,” Bruce Riedel, a senior fellow on foreign policy at the Brookings Institution, told PBS NewsHour.

The Trump administration has several reasons to feel inclined to play nice with the Saudis, he added.

“Trump has hoped Saudi Arabia would buy tens of billions of dollars in American weapons — they have not — and sell his ‘peace plan’ to the Arabs — they have not.”

Add to Trump’s aspirations the fact that the U.S. is one of the top importers of Saudi oil. The attack over the weekend knocked out nearly 6 percent of global oil supplies.

“The Saudis would like the Americans to fight Iran for them.”

The role oil plays in the global economy has been enough reason in the past for U.S. administrations to back Saudi Arabia.

“Every American president in the past 50 years has considered the free flow of oil through the Persian Gulf as a vital national security interest for the United States,” said Suzanne Maloney, a senior fellow at the Brookings Institution.

For example, despite having no international legal obligation to do so, the U.S. deployed a half million U.S. troops to defend Saudi Arabia and their oil reserves against Iraq in the Gulf War in 1992.

The circumstances for Trump are different. He is against long and expensive foreign entanglements and takes a “highly transactional approach to foreign policy” more generally, Maloney said.

Particularly in the run up to 2020, his “prospects for reelection would be doomed” if he got involved in a war in the Middle East, she added. For the Saudis, though they are pushing for some action against Iran, they are “not eager to be in the midst of a shooting war between the U.S. and Iran because of the devastating fallout for the whole region,” Maloney said.

Can the U.S. sit this out?

Unlike the explicit terms of NATO, which requires members to consider an attack on one as an attack on them all, there is no such obligation between the U.S. and the Kingdom of Saudi Arabia.

In 1951, the two countries signed the Mutual Defense Assistance Agreement, which helped cement full diplomatic relations between them, and provided U.S. arms sales and military training to the Kingdom. But it does not legally obligate American intervention in defense of Saudi Arabia if the country were to be attacked. Any U.S. move is likely to be limited, experts said.

“There is no plausible legal justification for a broad U.S. response, especially given the factual uncertainties here,” said Harold Hongju Koh, an international law professor at Yale Law School and former legal adviser to the State Department under the Obama administration.

Under the U.S. Constitution, a formal declaration of war must come from Congress. But that hasn’t happened since World War II.

“There is no plausible legal justification for a broad U.S. response, especially given the factual uncertainties here.”

Since then, there have been other justifications for U.S. military involvement in other countries. In the current case, it is more likely that the Trump administration will try to pursue “scenarios for a one-off retaliatory strike, solely against Iranian property with no anticipated civilian casualties,” Koh said. “Under international law, the administration would probably claim that such a response could be justified as a limited reprisal.”

Koh cites Article 51 of the United Nations Charter, which gives countries the right to “collective self-defense if an armed attack occurs against a Member of the United Nations.” However, other U.N. nations would likely object to the United States’ reasoning.

The Trump administration has used its power to come to the defense of the Kingdom. In May, the president overrode objections from Congress to push through sales of more than $8 billion in weapons to Saudi Arabia. The White House declared a national emergency to circumvent congressional disapproval, with the administration arguing that the arms would help deter the threat posed by Iran.