WASHINGTON — Two of the Persian Gulf’s richest monarchies pledged $8 billion in cash and loans to Egypt on Tuesday, a decision that was aimed not only at shoring up a shaky transitional government, but also at undermining their Islamist rivals and strengthening their allies across a newly turbulent Middle East.

The robust financial aid package announced by Saudi Arabia and the United Arab Emirates came a day after the Egyptian military killed dozens of Muslim Brotherhood members protesting last week’s military ouster of Egypt’s Islamist president, Mohamed Morsi. The aid package underscored a continuing regional contest for influence between Saudi Arabia and Qatar, one that has accelerated since the Arab uprising upended the status quo and brought Islamists to power.

Qatar, in alliance with Turkey, has given strong financial and diplomatic support to the Muslim Brotherhood, but also to other Islamists operating on the battlefields of Syria and, before that, Libya. Saudi Arabia and the Emirates, by comparison, have sought to restore the old, authoritarian order, fearful that Islamist movements and calls for democracy would destabilize their own nations.

The promise to provide so much assistance also highlighted the limits of American leverage: the United States provides Egypt $1.5 billion in annual aid, a small fraction of what the gulf states have promised. But the gulf intervention contrasted sharply with the Obama administration’s uncertainty about how to respond to the military takeover, and more broadly, how to wield influence across an increasingly chaotic and fragmented Arab world where American interests are hard to define.

The White House has said it is reviewing the circumstances of the takeover before making a decision on the annual aid to Egypt — which some in Congress, notably Senator John McCain of Arizona, have said should be suspended, calling the takeover a coup d'état. But on Tuesday, the White House spokesman, Jay Carney, struck a somewhat different tone, saying the administration was encouraged by the timetable provided by Egypt’s interim authorities for a transition to elections and a fully civilian government.

The Saudis and Emiratis were nearly buoyant at the military’s move to oust Mr. Morsi. Both are deeply hostile to the Brotherhood’s Islamist-cum-democratic agenda, which they see as a threat both to their own monarchical legitimacy and to regional stability. Qatar, by contrast, provided about $8 billion in aid to Mr. Morsi’s government during his yearlong tenure, and Turkey offered loans of $2 billion.

The tensions between Qatar and Saudi Arabia are older and broader than the Arab uprisings that began in 2011. Saudi Arabia, which prefers to work its checkbook diplomacy quietly and behind the scenes, sees itself as the regional leader. But the Qataris have for years fashioned an outsize foreign policy, often rebuffing Saudi Arabia’s perceived interests, using its wealth and Al Jazeera, the television network it built, to play a decisive role in some of the region’s most volatile and important events.

Qatar, host to the largest American military base in the Middle East, has also eagerly financed Islamists in Tunisia, Libya, Syria and Egypt, often siding with the Muslim Brotherhood or its affiliates, like Hamas. Qatar angered the Saudis (and the Obama administration) by supporting Islamist rebels in Syria and providing some heavier weapons, like shoulder-fired missiles, against American advice.

Suddenly, some of the tables have turned on Qatar.

With the rise of the Brotherhood, the Saudis had largely cut off aid to Mr. Morsi’s government and ignored American requests to help Egypt manage a worsening economic crisis. After Mr. Morsi was ousted by the Egyptian military, the Saudi and Emirati governments were quick to issue strong statements of support for the transition. On Friday night, King Abdullah of Saudi Arabia personally called Egypt’s army chief, Gen. Abdul-Fattah el-Sisi, to reinforce his backing for the caretaker government, The Associated Press reported.

“This is clearly a setback for the ideology that Qatar and Turkey support and encourage,” said one Arab official, who spoke on the condition of anonymity so as not to antagonize two powerful nations. “If political Islam was a stock, it would have gone down dramatically over the past week.”

Qatari officials declined to comment on the rivalry. But one Qatari official, speaking on condition of anonymity, said Qatar’s financial aid in the past had been to the Egyptian people, not any individual figure or party.

The Qataris suffered two other, lesser setbacks in recent days: on Monday, 22 journalists at Al Jazeera resigned en masse, citing what they said was the station’s biased coverage of the Brotherhood. Al Jazeera’s bias in favor of the Islamist group has often been cited as a grievance against Qatar’s rulers, who are accused of using the station as an arm of their activist foreign policy.

Also on Tuesday, Ghassan Hitto, the prime minister of the main Syrian exile opposition group — who was seen as favorable to Qatar — resigned. Although the reasons for his resignation were not clear, it was generally viewed as a concession to Saudi Arabia, which had signaled its discontent with him.

Some analysts say Qatar has already begun to rein in its aggressive and eclectic foreign policy, which has included a willingness to engage with Iran that infuriated its Saudi neighbors. Last week, Qatar’s government joined Saudi Arabia and others in issuing a message of support to the transitional government installed by the Egyptian military, even as its allies in the Brotherhood protested furiously against what they called a military coup.

“It’s starting to look as if the Qataris have ceased playing the role of troublemaker and freelancer in the region, and falling in behind the Saudis,” said Peter Harling, an adviser with the International Crisis Group. “Events are allowing the Saudis to assume a regional leadership role that no one else can play right now.”

Despite Qatar’s strong financial support for Mr. Morsi’s government, some analysts say Qatari officials had privately become very critical of his many blunders over the past year. “The Qataris were not happy with the decision to take Morsi out, but they were not so happy with Morsi, either,” said Mustafa Alani, an analyst with the Dubai-based Gulf Research Center.

The shift in Qatar’s role may also be related to the accession last month of the new Qatari emir, Sheik Tamim bin Hamad al-Thani, Mr. Alani said. The emir led a joint Saudi-Qatari committee formed in 2007 to reduce tensions between the two countries, and he is widely thought to take a less aggressive approach to foreign policy than his father, Sheik Hamad bin Khalifa al-Thani, the former emir.

Qatar’s support for the Muslim Brotherhood was seen by some analysts as a policy based on pragmatism rather than ideology — it was viewed as a populist group that could deliver results, unlike its more secular and often more fractious rivals. That perception, too, may change now that the Brotherhood has been deposed in Egypt. Turkey’s support for Brotherhood affiliates was more a matter of shared principles: Turkey’s governing party is a mildly Islamist and populist group. But Turkey’s own struggles with a domestic protest movement in the past two months is likely to curtail its appetite for foreign adventures.

The Qatari and Turkish financial aid to Mr. Morsi’s government last year helped him to avert painful economic reforms being urged by the International Monetary Fund as the price for its own $4.8 billion aid package. The United States believes those changes — including a reduction of food and electricity subsidies — are necessary to help bring Egypt out of its crushing deficit and economic malaise.

But the Saudi and Emirati aid may serve the same purpose, staving off unpopular decisions and limiting another potential avenue of American influence over Egypt’s next government.

A version of this article appears in print on , Section A, Page 1 of the New York edition with the headline: Egypt Is Arena For Influence Of Arab Rivals. Order Reprints | Today’s Paper | Subscribe