RIYADH, Saudi Arabia — Persian Gulf leaders, led by King Salman of Saudi Arabia, are sending increasingly public messages of displeasure with the Obama administration over its policies in the Middle East, even as the president seeks to reassure them this week in meetings at Camp David.

Yet, while they are upset with the White House, particularly over the impending nuclear deal with Iran, the Saudis and their gulf allies face a dilemma: Even as they are taking a more active role in their own defense, they remain almost entirely reliant on Washington for their security.

This dependency “has to change, and they know this has to change,” said Jean-Francois Seznec, a professor of Persian Gulf political economy at the School of Advanced International Studies at Johns Hopkins University.

Decades of cooperation and billions of dollars in weapons contracts have left the gulf nations deeply entwined with the United States and Britain in ways that cannot be quickly undone, analysts say. Qatar hosts the largest United States air base in the region, and Bahrain is the home port of the Navy’s Fifth Fleet. And their efforts to make reliable military partners of fellow Muslim nations like Pakistan and Egypt have met little success, despite tens of billions of dollars in aid.