WASHINGTON — In a move meant to reassure a vital Persian Gulf ally about the Iran nuclear deal, the Pentagon is finalizing a $1 billion arms agreement with Saudi Arabia that will provide weapons for the Saudi war effort against the Islamic State and Yemen, senior administration officials said Thursday.

Details of the pact are being worked out ahead of a visit by King Salman of Saudi Arabia to the White House on Friday, the officials said, adding that the deal must be approved by Congress before it is final. The two leaders are also expected to discuss additional military training that the United States can provide for Saudi Arabia as it adopts a more muscular stance in the region.

The weapons deal, although not the largest between the United States and Saudi Arabia, comes at a time when the Obama administration is promising Arab allies that it will back them against what many Arab governments view as a rising Iran. It also comes as the Middle East is descending into proxy wars, sectarian conflicts and battles against terrorist networks.

The result is that countries in the region that had stockpiled American military hardware are now using it and wanting more, a boon for American defense contractors.