Major stock markets in the Gulf ended lower on Wednesday after Iran launched missiles at bases housing U.S. forces in Iraq, while Saudi Aramco extended losses.

Iran retaliated against the U.S. drone strike that killed an Iranian commander late last week, an attack that stoked fears of all-out conflict in the Middle East and set off a bout of risk aversion. 

However, Iranian officials said Tehran did not want a war and its strikes "concluded" its response to the U.S. air strike, helping settle down surges in oil and gold prices.

Saudi Arabia's benchmark index dipped 0.9% with all its banking stocks ending in red except one. Al Rajhi Bank was down 0.9%, while Samba Financial Group 1090.SE decreased 2.2%.

State-owned Saudi Aramco fell 0.4% to 34.2 riyals ($9.12), extending losses for a fourth day in a row. The stock opened at 34 riyals, hitting its lowest since it began trading on Dec. 11.

The oil giant's shares are down almost 12% from a high of 38.70 riyals on Dec. 12, but still above the IPO price of 32 riyals, which valued the company at $1.7 trillion.

Dubai's main share index declined 1.2% with its largest lender Emirates NBD shedding 2.3% and Emaar Properties losing 1.2%.

In Abu Dhabi, the index retreated 0.7% driven down by a 1.1% fall in the country's largest lender First Abu Dhabi Bank, and a 0.6% ease in telecoms firm Etisalat.

The Qatari index fell 0.4% as Qatar International Islamic Bank and Qatar Fuel shed 2.8% and 1.1%, respectively.

Outside the Gulf, Egypt's blue-chip index advanced 2.5% in its first session of gains this year, as all its 30 stocks rose. The index is still down 3% so far this year.

Commercial International Bank leapt 3.2% and Egypt Kuwait Holding ended 5.7% higher.

SAUDI ARABIA down 0.9% to 8,124 points

ABU DHABI .lost 0.7% to 5,019 points

DUBAI dropped 1.2% to 2,713 points

QATAR eased 0.4% to 10,337 points

EGYPT up 2.5% to 13,542 points

BAHRAIN fell 0.4% to 1,585 points

OMAN slipped 0.1% to 3,944 points

KUWAIT edged down 0.1% to 6,799 points ($1 = 3.7510 riyals)

(Reporting by Ateeq Shariff in Bengaluru; Editing by Andrew Cawthorne) ((AteeqUr.Shariff@thomsonreuters.com; +918067497129;))