Within the administration, there is much discussion over what retaliatory action to take, if any, and whether such a response would appear to be doing the Saudis’ bidding. The question is a challenging one for President Trump, who first declared after the attacks that the United States was “locked and loaded,” but then softened his tone and said he would like to avoid conflict.

The attack is viewed as the most destructive strike to Saudi Arabia since it opened an offensive in Yemen more than four years ago. The strikes at the Abqaiq processing facility and Khurais oil field initially cut by more than 50 percent the oil produced by the kingdom, which supplies about a tenth of the worldwide total. By Tuesday, Saudi Aramco, Saudi Arabia’s national oil company, said it would fully restore oil production by the end of September at facilities that were attacked by air on Saturday.

Defense Secretary Mark T. Esper and Gen. Joseph F. Dunford Jr., the chairman of the Joint Chiefs of Staff, have presented Mr. Trump with an array of military options — presumably both bombing targets such as the missile-launching sites and storage areas as well as covert cyberoperations that could disable or disrupt Iran’s oil infrastructure.

A big concern is to ensure that any strikes be proportional and not escalate the conflict, particularly with world leaders gathering next week in New York for the United Nations General Assembly. Officials also voiced worry about the cost of doing nothing, at least openly, in response to attacks that have cut in half the oil production of one of Washington’s main allies in the Middle East.

If Iran is proved to be behind the attacks, it may be because it is looking for increased diplomatic and economic leverage, said current and former officials. Tehran has been pressed by the tough economic sanctions imposed by the Trump administration. Although an attack by Iran would represent a sharp escalation, Iranian officials may be counting that Mr. Trump’s reluctance to start a war in the Middle East will restrain the American response. Iran may believe that by committing a dramatic strike, the current and former officials said, it could improve its negotiating position before the United Nations meeting.