JIDDAH, Saudi Arabia — As Washington’s negotiations with Tehran over its nuclear program entered a crucial stage this week, Secretary of Defense Chuck Hagel told Arab defense chiefs Wednesday that the United States would keep a robust military presence in a region where many fear the prospect of a nuclear-armed Iran.

“While our strong preference is for a diplomatic solution, the United States will remain postured and prepared to ensure that Iran does not acquire a nuclear weapon,” Hagel told defense ministers from the Gulf Cooperation Council, a grouping of six Arab states bordering the Persian Gulf. “These negotiations will under no circumstance trade away regional security for concessions on Iran’s nuclear program.”

Hagel’s visit to this Red Sea city in western Saudi Arabia was meant to send a signal as diplomats from the United States and five other world powers engage with their Iranian counterparts in Vienna this week on the outlines of a deal under which Tehran would curtail its uranium-enrichment activities, which U.S. officials fear could lead to development of nuclear weapons.

Sunni Arab states have long feared that a nuclear-armed Iran could significantly boost the Shiite Islamic Republic’s clout in a region increasingly divided along sectarian lines.

As the negotiations with the world powers have tentatively advanced, though, Saudi Arabia appears increasingly inclined to explore closer ties with Tehran. On Tuesday, the Saudi foreign minister announced that he has invited his Iranian counterpart to visit.

Speaking to reporters after the closed-door meeting with defense chiefs from Saudi Arabia, Qatar, the United Arab Emirates, Bahrain, Kuwait and Oman, Hagel told reporters that he had urged his counterparts to coordinate more closely on the aid that foreign governments are providing to Syrian rebels. Washington has expressed concern that Qatar and Saudi Arabia are arming extremists.

“We agreed that our assistance must be complementary and that it must be carefully directed to the moderate opposition,” Hagel said.

Leaders from Saudi Arabia and other Gulf states refrained from making substantive public remarks.

Shortly after Hagel spoke, Saudi King Abdullah announced a surprise reshuffle of top defense positions that could have an impact on America’s relationship with Saudi Arabia.

The deputy defense minister Prince Salman bin Sultan bin Abdul Aziz was removed from his post “upon his request,” according to the Saudi Press Agency, and replaced by Prince Khaled bin Bandar bin Abdul Aziz, the governor of capital Riyadh. That post was given to the king’s son, Prince Turki bin Abdullah.

The moves look like an attempt by the ageing king to consolidate the control of his branch of the royal family over key positions. However, the outgoing deputy defense minister had forged a close working relationship with Hagel over strategies for the war in Syria, the issue that has most inflamed U.S.-Saudi ties. Prince Salman had addressed a luncheon in Jiddah attended by Hagel and the other regional defense ministers just hours before, and gave no indication that he was about to step down from his job.

“At the very least, it is surprising that the kingdom would make such changes on the day of a major regional defense conference, where they likely confused local military allies and the U.S. delegation alike,” wrote Simon Henderson of the Washington Institute for Near East Policy. The changes suggest, he said, “that Saudi Arabia may be reconsidering its regional strategy.”

The king also replaced the commanders of the army, navy and air force, who all retired, the Saudi Press Agency said.