RIYADH, Saudi Arabia — Defense Secretary Robert Gates tried to smooth the worst rift in years with Arab ally and oil producer Saudi Arabia on Wednesday, reassuring the Saudi king that the U.S. remains a steady friend despite support for pro-democracy revolutions in the Middle East.

The Saudi king, looking thin after months of medical treatment in the United States and elsewhere, welcomed Gates for what the Pentagon chief later said was a cordial and warm visit.

The hospitality masked deep unease among Saudi Arabia's aged leadership about what the political upheaval in the Middle East means for its hold on power, its role as the chief counterweight to a rising Iran, and its changed relationship with the United States.

In a sign of the depth of the Obama administration's concern about the political earthquake that has shaken the region, including the island of Bahrain off Saudi Arabia's Persian Gulf coast, this was Gates' third trip to the area in the past month. He has echoed Secretary of State Hillary Rodham Clinton's cautioning of authoritarian Arab governments on the risks of moving too slowly in response to peaceful protests for political freedom.

Saudi Arabia views the threat of a nuclear strike from Iran as a far larger issue than the drive for political freedoms in Egypt and elsewhere.

Although Gates said he and Saudi King Abdullah did not discuss the decision to send Saudi troops into Bahrain last month, the contest for influence in that majority-Shiite country was an important subtext to Gates' visit. The U.S. is selling Saudi Arabia military hardware to upgrade the kingdom's defenses against Iranian missiles.

"We already have evidence that the Iranians are trying to exploit the situation in Bahrain, and we also have evidence that they are talking about what they can do to create problems elsewhere," Gates said following the meeting.

The unrest in Bahrain, which erupted in February, has played out against the region's deep rivalries between Shiite and Sunni Muslims. Protesters from Bahrain's Shiite majority have demanded that the kingdom's Sunni minority rulers grant them equal rights and a political voice.

Saudi Arabia, a largely Sunni nation, has rushed to the aid of Bahrain, while other Gulf countries have accused predominantly Shiite Iran of meddling in Bahrain's affairs by trying to stir Shiite unrest there.

U.S. relations with the Saudi ruling family have been strained for months, dating to the uprising in Egypt and President Barack Obama's call for longtime U.S. ally Hosni Mubarak to give up his presidency. Saudi leaders saw this as the U.S. abandoning a reliable friend with close military and diplomatic ties stretching over decades — not unlike the U.S.-Saudi alliance, which has the added dimension of American dependence on Saudi oil.

Gates has acknowledged tensions in the relationship with the Saudis but insists it remains a strong partnership.

"'It's a great exaggeration to say this relationship's ruptured," Gates said last month on NBC's "Meet the Press." "We have a very strong military-to-military relationship. As you know, the Saudis just made one of the largest purchases of American weapons in their history."

Gates was referring to a $60 billion deal announced last fall to sell the Saudis 84 new F-15 fighter jets and 190 helicopters, as well as upgrade 70 of their existing F-15s. The deal includes a wide array of missiles, bombs and other equipment — mostly with a perceived Iranian threat in mind. Iran, with its Shiite Muslim theocracy in charge, has long been a bitter rival of the Saudis, whose rulers and majority population are Sunni Muslim.

Limited protests in Saudi Arabia reportedly have been confined mainly to Shiites in the eastern oil-producing provinces.

A senior defense official traveling with Gates from Washington said the kingdom's internal political situation was unlikely to be broached in Gates' talks with Abdullah. The official spoke on condition of anonymity in order to discuss Gates' thinking in advance of his closed-door meeting with the king.

The official said Gates would assure Abdullah that the $60 billion arms deal is progressing on schedule, while also urging the king to buy an upgraded version of its U.S.-made Patriot air defense missiles. Gates also planned to pitch a more sophisticated U.S. defense system called the Theater High-Altitude Area Defense system, which is designed to shoot down ballistic missiles of longer range. The United Arab Emirates already has agreed to purchase that system, the official said. It is part of a broader U.S. plan to improve Gulf Arab states' defenses against Iranian missile threats.

Geoff Morrell, the Pentagon press secretary, told reporters on Gates' flight to Riyadh that "Iran will be a major focus" of Gates' talks with Abdullah — not just its missile development, but also its nuclear weapons ambitions and concerns that Iran is seeking to exploit political upheaval in the Arab world.

Strains in the U.S.-Saudi relationship deepened with the crisis in Bahrain, where a Sunni family dynasty rules a Shiite-majority population. The Saudis dread a further empowering of Shiites, following the 2003 U.S.-led overthrow of Saddam Hussein's Sunni regime and the rise to power there of a Shiite prime minister, Nouri al-Maliki.

"Saudis believe their concerns in Bahrain — containing Iran, protecting Gulf monarchies and sending a clear message to their own Shiite population — are best addressed by a hardline policy of suppressing the protests," Marina Ottaway, director of the Middle East program at the Carnegie Endowment for International Peace, wrote in an analysis Monday.

Comment on this story

On March 14, two days after Gates visited Bahrain's rulers, the Saudis sent more than 1,000 troops into Bahrain, at that government's request, for security assistance. Ottaway concluded from Washington's muted response that it has chosen to implicitly back the Saudis.

"Washington has seemingly accepted that for the time being the Saudis have won the battle for influence in Bahrain and concluded that mending relations with Saudi Arabia should take precedence right now," she wrote.

Meanwhile, a leading Iranian cleric on Wednesday urged protesters in the Gulf kingdom of Bahrain to "stand up and resist" a government crackdown that has been backed by hundreds of Saudi Arabian troops.

Ayatollah Ahmad Khatami, speaking to clerics in the holy city of Qom, also demanded that Saudi Arabia withdraw its forces from Bahrain.