Saudi Arabian shares ended 2020 higher, outperforming other Middle East markets in a pandemic-ravaged year on the back of a recovery in oil prices and strong inflows, while Egyptian equities declined the most in the region.

Middle East stocks had fallen between 13% and 36% in the first quarter as the spread of COVID-19 and an oil price war between top producers Saudi Arabia and Russia raised fears of a global recession.

However, the markets trimmed some of their losses on economic aid from governments, an oil price recovery and progress on COVID-19 vaccines.

"The global distribution of vaccines and the process of vaccination in the GCC (Gulf Cooperation Council) region would instil further confidence in investors", said Junaid Ansari, acting head of investment strategy and research at Kamco Invest.

The Saudi index closed down 0.8% on Thursday, but rose 3.6% in 2020 to log its fifth straight yearly gain.

"The recovery in crude oil prices to around the USD 50/b level supported TASI in H2-2020," Ansari said.

Oil giant Saudi Aramco declined 0.7% for the year, but outperformed its global peers.

"The EM status and availability of companies with size and different sector exposures attracted foreigners, while the retail and domestic institutional investors provided much-needed liquidity to the Saudi market" said Joice Mathew, research analyst at United Securities.

Egypt's benchmark index EGX30 fell 0.2% and booked a yearly loss of 22.3%.

The country's equities underperformed regional peers due to concerns over coroanvirus-related lockdowns that eclipsed good earnings from most companies, said Radwa El Swaify of Pharos Research.

The Dubai index dropped 1% to end the year down 10%, having declined as much as 36% in the first quarter.

"Dubai stocks recouped from the early losses, riding the reopening theme. However, we are yet to see major sectors of the economy fully recover from the pandemic issues," United Securities' Mathew said.

Abu Dhabi's index eased 0.8% and lost 0.6% in 2020.

The Qatari index fell 0.9%, but eked out a gain of 0.1% for the year, its third straight yearly rise.

Kuwait's stock market, the best performer in the region last year, slipped 0.1% to record a 13.3% yearly loss.

(Reporting by Maqsood Alam in Bengaluru, additional reporting by Saeed Azhar and Ehab Farouk; Editing by Aditya Soni) ((Maqsood.Alam@thomsonreuters.com;))