RIYADH/DUBAI, Dec 6 (Reuters) - Saudi Arabia has asked the United States to show restraint in responding to attacks by Yemen's Houthis against ships in the Red Sea, two sources familiar with Saudi thinking said, as Riyadh seeks to contain spillover from the Hamas-Israel war.

The Iran-aligned Houthis have waded into the conflict that has spread around the Middle East since war erupted on Oct. 7, attacking vessels in vital shipping lanes and firing drones and missiles at Israel itself.

The group which rules much of Yemen says its attacks are a show of support for the Palestinians and has vowed they will continue until Israel stops its offensive on the Gaza Strip - more than 1,000 miles from their seat of power in Sanaa.

The Houthis are one of several groups in the Iran-aligned "Axis of Resistance" which have been attacking Israeli and U.S. targets since the start of the conflict on Oct. 7, when their Palestinian ally Hamas sparked the war by attacking Israel.

Their role has added to the conflict's regional risks, threatening sea lanes through which much of the world's oil shipped, and worrying states on the Red Sea as Houthi rockets and drones fly towards Israel.

Riyadh, the world's top oil exporter, has watched with alarm as Houthi missiles have been fired over its territory.

With the Houthis stepping up attacks on shipping over the past weeks, two sources familiar with Saudi thinking said Riyadh's message of restraint to Washington aimed to avoid further escalation. Riyadh was so far pleased with the way the United States was handling the situation, the sources added.

"They pressed the Americans about this and why the Gaza conflict should stop," one of the sources said.

The White House declined to comment.

The Saudi government did not respond to an emailed request for a comment on the discussions.

As Saudi Arabia presses for a ceasefire to halt what it has called a "barbaric war" in Gaza, its diplomacy reflects a wider policy aimed at promoting regional stability after years of confrontation with Iran and its allies.

Focused on expanding and diversifying the Saudi economy, Riyadh this year normalised ties with Tehran and is seeking to exit the war it has been waging with the Houthis in Yemen for nearly nine years.

The sources said Saudi Arabia was seeking to advance the Yemen peace process even as war rages in Gaza, worrying it could be derailed. Yemen has enjoyed more than a year of relative calm amid direct peace talks between Saudi and Houthi officials.

The Houthi attacks during the Hamas-Israel war have elevated their profile in the Iran-aligned camp which also includes Hamas, Lebanon's Hezbollah and Iran-backed militias in Iraq.

The Houthis have emerged as a major military force in the Arabian Peninsula, with tens of thousands of fighters and a huge arsenal of ballistic missiles and armed drones.

Senior sources in the Iran-aligned camp told Reuters the Houthi attacks were part of an effort to put pressure on Washington to get Israel to halt the Gaza offensive, a goal that Iran shares with Saudi Arabia and other countries in the region.

One of the sources, who is based in Tehran, said Houthi representatives had discussed their attacks with Iranian officials during a meeting in Tehran in November, agreeing to carry out actions in a "controlled" way that would help force an end to the Gaza war. The source was briefed on the matter.

Another of the sources said Tehran did not seek "all-out war in the region" that would risk drawing it in directly.

A Houthi spokesperson did not respond to a request for comment. Iran has denied being involved in the attacks. Iranian officials did not respond to a request for comment on the Houthi attacks.

Photo from Reuters